Fix crash

This commit is contained in:
nielsandriesse 2020-10-27 09:42:39 +11:00
parent 53a58acbd5
commit 4e69a538cb

View File

@ -24,8 +24,8 @@ class PublicChatManager(private val context: Context) {
var areAllCaughtUp = true
refreshChatsAndPollers()
for ((threadID, chat) in chats) {
val poller = pollers[threadID] ?: PublicChatPoller(context, chat)
areAllCaughtUp = areAllCaughtUp && poller.isCaughtUp
val poller = pollers[threadID]
areAllCaughtUp = if(poller != null) areAllCaughtUp && poller.isCaughtUp else false
}
return areAllCaughtUp
}