Merge pull request #6 from TouchInstinct/thanks
roboswab winter update fix
This commit is contained in:
commit
4e7beb7731
|
|
@ -98,14 +98,16 @@ class ViewControllerFragment<TActivity : FragmentActivity, TState : Parcelable>
|
|||
private var viewController: ViewController<out TActivity, out TState>? = null
|
||||
private var pendingActivityResult: ActivityResult? = null
|
||||
private var appeared: Boolean = false
|
||||
private val viewControllerClass: Class<ViewController<TActivity, TState>> = arguments?.getSerializable(VIEW_CONTROLLER_CLASS_EXTRA)
|
||||
as? Class<ViewController<TActivity, TState>> ?: throw IllegalArgumentException("View controller class must be not-null")
|
||||
private lateinit var viewControllerClass: Class<ViewController<TActivity, TState>>
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
setHasOptionsMenu(true)
|
||||
|
||||
viewControllerClass = arguments?.getSerializable(VIEW_CONTROLLER_CLASS_EXTRA) as? Class<ViewController<TActivity, TState>>
|
||||
?: throw IllegalArgumentException("View controller class must be not-null")
|
||||
|
||||
state = savedInstanceState?.getParcelable<TState>(VIEW_CONTROLLER_STATE_EXTRA)
|
||||
?: arguments?.getParcelable(VIEW_CONTROLLER_STATE_EXTRA)
|
||||
?: throw IllegalStateException("State is required and null")
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ open class ViewController<TActivity : FragmentActivity, TState : Parcelable>(
|
|||
* Happens at [ViewControllerFragment.onActivityCreated].
|
||||
*/
|
||||
@CallSuper
|
||||
fun onCreate() {
|
||||
open fun onCreate() {
|
||||
LcGroup.UI_LIFECYCLE.i(Lc.getCodePoint(this))
|
||||
lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_CREATE)
|
||||
}
|
||||
|
|
@ -226,7 +226,7 @@ open class ViewController<TActivity : FragmentActivity, TState : Parcelable>(
|
|||
* Called when fragment is moved in started state and it's [.getFragment] sets to true.
|
||||
* Usually it is indicating that user can't see fragment on screen and useful to track analytics events.
|
||||
*/
|
||||
fun onAppear() {
|
||||
open fun onAppear() {
|
||||
LcGroup.UI_LIFECYCLE.i(Lc.getCodePoint(this))
|
||||
}
|
||||
|
||||
|
|
@ -245,14 +245,14 @@ open class ViewController<TActivity : FragmentActivity, TState : Parcelable>(
|
|||
* Happens at [ViewControllerFragment.onLowMemory].
|
||||
*/
|
||||
@CallSuper
|
||||
fun onLowMemory() = Unit
|
||||
open fun onLowMemory() = Unit
|
||||
|
||||
/**
|
||||
* Calls when [ViewController] have paused.
|
||||
* Happens at [ViewControllerFragment.onPause].
|
||||
*/
|
||||
@CallSuper
|
||||
fun onPause() {
|
||||
open fun onPause() {
|
||||
LcGroup.UI_LIFECYCLE.i(Lc.getCodePoint(this))
|
||||
lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_PAUSE)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue