1
0
mirror of https://github.com/tuskyapp/Tusky synced 2024-12-27 01:06:25 +01:00

Fix negative count on the unread announcements badge. (#2010)

Fixes #1994
This commit is contained in:
Levi Bard 2020-12-04 17:37:52 +01:00 committed by GitHub
parent e25800de1b
commit b8268538fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -713,7 +713,7 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
} }
private fun updateAnnouncementsBadge() { private fun updateAnnouncementsBadge() {
mainDrawer.updateBadge(DRAWER_ITEM_ANNOUNCEMENTS, StringHolder(if (unreadAnnouncementsCount == 0) null else unreadAnnouncementsCount.toString())) mainDrawer.updateBadge(DRAWER_ITEM_ANNOUNCEMENTS, StringHolder(if (unreadAnnouncementsCount <= 0) null else unreadAnnouncementsCount.toString()))
} }
private fun updateProfiles() { private fun updateProfiles() {