File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
android/src/main/lifecycle-compat/v26/com/rnmapbox/rnmbx/components/mapview Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import android.view.View
55import androidx.lifecycle.Lifecycle
66import androidx.lifecycle.LifecycleOwner
77import androidx.lifecycle.LifecycleRegistry
8- import androidx.lifecycle.setViewTreeLifecycleOwner
8+ import androidx.lifecycle.ViewTreeLifecycleOwner
99
1010/* *
1111 * Lifecycle compatibility for Lifecycle 2.6+ which uses 'lifecycle' property
@@ -35,11 +35,12 @@ class RNMBXLifeCycle {
3535 }
3636
3737 // Lifecycle 2.6+ uses property syntax
38- override val lifecycle: Lifecycle
39- get() = lifecycleRegistry
38+ override fun getLifecycle (): Lifecycle {
39+ return lifecycleRegistry
40+ }
4041
4142 }
42- view.setViewTreeLifecycleOwner( lifecycleOwner)
43+ ViewTreeLifecycleOwner .set(view, lifecycleOwner)
4344 }
4445 lifecycleOwner?.handleLifecycleEvent(Lifecycle .Event .ON_START )
4546 }
You can’t perform that action at this time.
0 commit comments