Emit settings only when they change (#100, #77)

This commit is contained in:
makiolaj committed 2026-11-20 11:50:12 +01:00
1 parent 401191658b
commit b71f75dcd2
1 file changed
+1 -1
@@ -324,7 +324,7 @@ class SettingsPrefs @Inject constructor(
upcomingRange = p[UPCOMING_RANGE]?.let { runCatching { UpcomingRange.valueOf(it) }.getOrNull() }
?: UpcomingRange.ALL,
)
}
}.distinctUntilChanged() // Other stores write this DataStore too.
/** Folds or unfolds the group with [id]; day groups that have passed are dropped on the way. */
suspend fun setGroupCollapsed(id: String, collapsed: Boolean) = dataStore.edit { p ->