Skip to content

Commit

Permalink
fix: deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyMuse committed May 22, 2024
1 parent 10cba8f commit 8025d74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ import androidx.compose.ui.platform.LocalFontFamilyResolver
import androidx.compose.ui.platform.LocalHapticFeedback
import androidx.compose.ui.platform.LocalInspectionMode
import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.platform.LocalLifecycleOwner
import androidx.compose.ui.platform.LocalSavedStateRegistryOwner
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.platform.LocalTextInputService
import androidx.compose.ui.platform.LocalTextToolbar
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.platform.LocalView
Expand All @@ -45,7 +43,6 @@ import androidx.compose.ui.platform.UriHandler
import androidx.compose.ui.platform.ViewConfiguration
import androidx.compose.ui.platform.WindowInfo
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.input.TextInputService
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.LayoutDirection
import androidx.lifecycle.LifecycleOwner
Expand All @@ -57,7 +54,7 @@ import androidx.savedstate.SavedStateRegistryOwner

val lifecycleOwner: LifecycleOwner
@Composable get() {
return LocalLifecycleOwner.current
return androidx.lifecycle.compose.LocalLifecycleOwner.current
}

val context: Context
Expand Down Expand Up @@ -129,11 +126,6 @@ val savedStateRegistryOwner: SavedStateRegistryOwner
return LocalSavedStateRegistryOwner.current
}

val textInputService: TextInputService?
@Composable get() {
return LocalTextInputService.current
}

val uriHandler: UriHandler
@Composable get() {
return LocalUriHandler.current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fun AddLifecycleObserver(observer: LifecycleObserver) {
}

@Composable
fun <OWNER : LifecycleObserver> OWNER.ObserveLifecycle(lifecycle: Lifecycle = LocalLifecycleOwner.current.lifecycle) {
fun <OWNER : LifecycleObserver> OWNER.ObserveLifecycle(lifecycle: Lifecycle = androidx.lifecycle.compose.LocalLifecycleOwner.current.lifecycle) {
DisposableEffect(lifecycle) {
lifecycle.addObserver(this@ObserveLifecycle)
onDispose {
Expand Down

0 comments on commit 8025d74

Please sign in to comment.