Exclude archived and blocked conversations when calculating unread count

This commit is contained in:
Moez Bhatti
2018-04-05 05:40:19 -04:00
parent e1da6cf5c1
commit 724480a3ea
@@ -194,6 +194,8 @@ class MessageRepositoryImpl @Inject constructor(
override fun getUnreadCount(): Long { override fun getUnreadCount(): Long {
return Realm.getDefaultInstance() return Realm.getDefaultInstance()
.where(Conversation::class.java) .where(Conversation::class.java)
.equalTo("archived", false)
.equalTo("blocked", false)
.equalTo("read", false) .equalTo("read", false)
.count() .count()
} }