diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt index e021b14045d782e8d3bead0da4f42beed1555fd1..000efbb3dd522087d4f38c9d9c2bc238503d8dc9 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListFragment.kt @@ -160,7 +160,10 @@ class MessageListFragment : if (!isUnifiedInbox && currentFolder != null) { foldersViewModel.getFolderListLiveData().observe(this) { folderList -> folderList.folders.forEach { - if (it.folder.id == currentFolder?.databaseId) { + if (isUnifiedInbox) { + return@observe + } + if (currentFolder != null && !currentFolder!!.loading && it.folder.id == currentFolder!!.databaseId) { unreadMessageCount = it.unreadMessageCount setWindowTitle() return@forEach