Fixed bugg where message was still marked as unread after returning from detail screen
+ bumped kotlin to version 1.1.60
This commit is contained in:
@ -106,9 +106,9 @@ class MessageDetailFragment : Fragment() {
|
||||
text.linksClickable = true
|
||||
text.setTextIsSelectable(true)
|
||||
|
||||
val removed = item.labels.removeAll { it.type == Label.Type.UNREAD }
|
||||
val messageRepo = Singleton.getMessageRepository(ctx)
|
||||
if (removed) {
|
||||
if (item.isUnread()) {
|
||||
Singleton.labeler.markAsRead(item)
|
||||
(activity as? MainActivity)?.updateUnread()
|
||||
messageRepo.save(item)
|
||||
}
|
||||
|
Reference in New Issue
Block a user