Replace preference getter functions with properties (#3091)

This commit is contained in:
AntsyLich
2026-03-20 14:57:01 +06:00
committed by GitHub
parent 2f9edb551f
commit 87665736a9
126 changed files with 816 additions and 722 deletions
@@ -242,8 +242,8 @@ object HomeScreen : Screen() {
val count by produceState(initialValue = 0) {
val pref = Injekt.get<LibraryPreferences>()
combine(
pref.newShowUpdatesCount().changes(),
pref.newUpdatesCount().changes(),
pref.newShowUpdatesCount.changes(),
pref.newUpdatesCount.changes(),
) { show, count -> if (show) count else 0 }
.collectLatest { value = it }
}
@@ -263,7 +263,7 @@ object HomeScreen : Screen() {
}
BrowseTab::class.isInstance(tab) -> {
val count by produceState(initialValue = 0) {
Injekt.get<SourcePreferences>().extensionUpdatesCount().changes()
Injekt.get<SourcePreferences>().extensionUpdatesCount.changes()
.collectLatest { value = it }
}
if (count > 0) {