mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-22 05:38:55 +00:00
Fix crash when interacting with notifications. Fixes #1218
This commit is contained in:
parent
2899bbdbfa
commit
1bb01256fc
2 changed files with 4 additions and 4 deletions
|
|
@ -326,13 +326,13 @@ interface ApiService {
|
|||
|
||||
// Notifications
|
||||
@POST("notifications/{notificationId}/read")
|
||||
fun readNotification(@Path("notificationId") notificationId: String): Flowable<HabitResponse<List<*>>>
|
||||
fun readNotification(@Path("notificationId") notificationId: String): Flowable<HabitResponse<List<Any>>>
|
||||
|
||||
@POST("notifications/read")
|
||||
fun readNotifications(@Body notificationIds: Map<String, List<String>>): Flowable<HabitResponse<List<*>>>
|
||||
fun readNotifications(@Body notificationIds: Map<String, List<String>>): Flowable<HabitResponse<List<Any>>>
|
||||
|
||||
@POST("notifications/see")
|
||||
fun seeNotifications(@Body notificationIds: Map<String, List<String>>): Flowable<HabitResponse<List<*>>>
|
||||
fun seeNotifications(@Body notificationIds: Map<String, List<String>>): Flowable<HabitResponse<List<Any>>>
|
||||
|
||||
@POST("user/open-mystery-item")
|
||||
fun openMysteryItem(): Flowable<HabitResponse<Equipment>>
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ open class NotificationsViewModel : BaseViewModel() {
|
|||
* instead of one of the ones coming from server.
|
||||
*/
|
||||
private fun isCustomNotification(notification: Notification): Boolean {
|
||||
return notification.id.startsWith("custom-")
|
||||
return notification.id.startsWith("custom-") || notification.id == "new-stuff-notification"
|
||||
}
|
||||
|
||||
fun dismissNotification(notification: Notification) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue