refactor(ui): Replace waitForState and shareLatest with lifecycle-aware state collection

Add collectAsStateWithLifecycle for all Compose state collection (except Glance widgets). Add asLiveState() extension to ViewModel2 as a simpler replacement for shareLatest(scope = vmScope). Remove custom waitForState helper and shareLatest utility.
This commit is contained in:
darken
2026-03-03 17:21:55 +00:00
committed by Matthias Urhahn
parent e13331dfcf
commit cd6488a713
28 changed files with 63 additions and 94 deletions
+1
View File
@@ -112,6 +112,7 @@ fun DependencyHandlerScope.addCompose() {
implementation("androidx.activity:activity-compose:1.12.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.5")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.5")
implementation("androidx.hilt:hilt-navigation-compose:1.3.0-alpha01")
}