Remove dependency on livedata libraries (#1453)
## Description Refactors all usages of `LiveData` into flows in keeping with best practices. This also includes refactoring several `ViewModel`s to combine multiple `LiveData` into a new single `StateFlow`. There are no user facing changes ### Related issues None ### Testing Emulator ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
982d9e6fe8
commit
0b450fc0ff
90 changed files with 2170 additions and 2283 deletions
|
|
@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
|||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.livedata.observeAsState
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
|
|
@ -88,7 +87,7 @@ class WholphinDreamService :
|
|||
setViewTreeLifecycleOwner(this@WholphinDreamService)
|
||||
setViewTreeSavedStateRegistryOwner(this@WholphinDreamService)
|
||||
setContent {
|
||||
val user by serverRepository.currentUser.observeAsState()
|
||||
val user by serverRepository.currentUserFlow.collectAsState(null)
|
||||
if (user != null) {
|
||||
var prefs by remember { mutableStateOf<AppPreferences?>(null) }
|
||||
LaunchedEffect(Unit) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue