Skip to content

Commit

Permalink
bailey notification fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hafizzle committed Aug 3, 2023
1 parent 27e7c4d commit c23c9d7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class NotificationsActivity : BaseActivity(), androidx.swiperefreshlayout.widget
val text = if (data?.title != null) {
fromHtml("<b>" + getString(R.string.new_bailey_update) + "</b><br>" + data.title)
} else {
baileyNotification = userRepository.getNewsNotification() ?: return@withContext null
baileyNotification = userRepository.getNewsNotification() ?: notification
val baileyNewsData = baileyNotification.data as? NewStuffData
fromHtml("<b>" + getString(R.string.new_bailey_update) + "</b><br>" + baileyNewsData?.title)
}
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit c23c9d7

Please sign in to comment.