mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Update some composition locals to not be static
This commit is contained in:
parent
a82d894a4b
commit
cef7e286cd
@ -44,6 +44,7 @@ import androidx.compose.runtime.Composable
|
|||||||
import androidx.compose.runtime.CompositionLocalProvider
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.MutableState
|
import androidx.compose.runtime.MutableState
|
||||||
|
import androidx.compose.runtime.compositionLocalOf
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.staticCompositionLocalOf
|
import androidx.compose.runtime.staticCompositionLocalOf
|
||||||
@ -98,7 +99,7 @@ val LocalManager = staticCompositionLocalOf<KeyboardManagerForAction> {
|
|||||||
error("No LocalManager provided")
|
error("No LocalManager provided")
|
||||||
}
|
}
|
||||||
|
|
||||||
val LocalThemeProvider = staticCompositionLocalOf<DynamicThemeProvider> {
|
val LocalThemeProvider = compositionLocalOf<DynamicThemeProvider> {
|
||||||
error("No LocalThemeProvider provided")
|
error("No LocalThemeProvider provided")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@ import androidx.compose.runtime.CompositionLocalProvider
|
|||||||
import androidx.compose.runtime.DisposableEffect
|
import androidx.compose.runtime.DisposableEffect
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.collectAsState
|
import androidx.compose.runtime.collectAsState
|
||||||
|
import androidx.compose.runtime.compositionLocalOf
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
import androidx.compose.runtime.staticCompositionLocalOf
|
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.core.content.edit
|
import androidx.core.content.edit
|
||||||
import androidx.datastore.preferences.core.Preferences
|
import androidx.datastore.preferences.core.Preferences
|
||||||
@ -28,7 +28,7 @@ class DataStoreCache(
|
|||||||
val currPreferences: Preferences
|
val currPreferences: Preferences
|
||||||
)
|
)
|
||||||
|
|
||||||
val LocalDataStoreCache = staticCompositionLocalOf<DataStoreCache?> {
|
val LocalDataStoreCache = compositionLocalOf<DataStoreCache?> {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user