diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/activities/NotificationsActivity.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/activities/NotificationsActivity.kt
index 93338e418d..f39227ce8a 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/activities/NotificationsActivity.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/activities/NotificationsActivity.kt
@@ -228,7 +228,7 @@ class NotificationsActivity : BaseActivity(), androidx.swiperefreshlayout.widget
val text = if (data?.title != null) {
fromHtml("" + getString(R.string.new_bailey_update) + "
" + data.title)
} else {
- baileyNotification = userRepository.getNewsNotification() ?: return@withContext null
+ baileyNotification = userRepository.getNewsNotification() ?: notification
val baileyNewsData = baileyNotification.data as? NewStuffData
fromHtml("" + getString(R.string.new_bailey_update) + "
" + baileyNewsData?.title)
}
@@ -458,11 +458,13 @@ class NotificationsActivity : BaseActivity(), androidx.swiperefreshlayout.widget
val acceptButton = item?.findViewById(R.id.accept_button) as? Button
acceptButton?.setOnClickListener {
+ removeNotificationAndRefresh(notification)
viewModel.accept(notification.id)
}
val rejectButton = item?.findViewById(R.id.reject_button) as? Button
rejectButton?.setOnClickListener {
+ removeNotificationAndRefresh(notification)
viewModel.reject(notification.id)
}