Added an option to hide unread counts in settings.#931
Added an option to hide unread counts in settings.#931udaign wants to merge 2 commits intoprof18:mainfrom
Conversation
prof18
left a comment
There was a problem hiding this comment.
Thanks for the contribution! I like the idea of hiding unread counts,it's a nice option for users who don't want the pressure of seeing numbers.
I have some feedback on the implementation approach:
Architecture suggestion:
The current implementation adds hideUnreadCountFlow to the combine() in HomeViewModel.initDrawerData() and sets counts to 0 in the ViewModel. This works, but I'd prefer a cleaner separation:
Instead of modifying the combine, expose hideUnreadCount as a separate StateFlow from the ViewModel:
// HomeViewModel
val hideUnreadCount: StateFlow<Boolean> = feedAppearanceSettingsRepository.hideUnreadCountFlow
Then have the UI observe it independently and decide whether to render the badge. This keeps the drawer data (counts)
separate from display preferences (whether to show them). The NavDrawerState stays unchanged, and the UI components just check the flag before rendering.
For Compose, pass hideUnreadCount down to the drawer components. For SwiftUI, same approach.
Other items needed:
- i18n strings - "Hide unread count" is hardcoded. Please add proper string resources and remove the TODO comments.
- iOS implementation - The iOS drawer components (TimelineSection.swift, BookmarksSection.swift, CategoriesSection.swift,
FeedSourceDrawerItem.swift) also display unread counts but weren't updated. The feature should work consistently across
platforms.
Let me know if you have questions about the suggested approach! Or if you prefer that i start from there and do the changes, just let me know.
|
Hi, you can proceed ahead with perfecting the implementation. The current implementation leaves the unread count alongside the main app title despite choosing to hide the count, please fix it too! Thank you. |
Helps to people who have so many feeds and can't go about reading everything.