upgrade ktlint plugin to 12.0.3 (#4169)
There are some new rules, I think they mostly make sense, except for the max line length which I had to disable because we are over it in a lot of places. --------- Co-authored-by: Goooler <wangzongler@gmail.com>
This commit is contained in:
parent
33cd6fdb98
commit
5192fb08a5
215 changed files with 2813 additions and 1177 deletions
|
|
@ -42,11 +42,15 @@ class FragmentViewBindingDelegate<T : ViewBinding>(
|
|||
}
|
||||
|
||||
override fun onCreate(owner: LifecycleOwner) {
|
||||
fragment.viewLifecycleOwnerLiveData.observeForever(viewLifecycleOwnerLiveDataObserver)
|
||||
fragment.viewLifecycleOwnerLiveData.observeForever(
|
||||
viewLifecycleOwnerLiveDataObserver
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDestroy(owner: LifecycleOwner) {
|
||||
fragment.viewLifecycleOwnerLiveData.removeObserver(viewLifecycleOwnerLiveDataObserver)
|
||||
fragment.viewLifecycleOwnerLiveData.removeObserver(
|
||||
viewLifecycleOwnerLiveDataObserver
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -59,7 +63,9 @@ class FragmentViewBindingDelegate<T : ViewBinding>(
|
|||
|
||||
val lifecycle = fragment.viewLifecycleOwner.lifecycle
|
||||
if (!lifecycle.currentState.isAtLeast(Lifecycle.State.INITIALIZED)) {
|
||||
throw IllegalStateException("Should not attempt to get bindings when Fragment views are destroyed.")
|
||||
throw IllegalStateException(
|
||||
"Should not attempt to get bindings when Fragment views are destroyed."
|
||||
)
|
||||
}
|
||||
|
||||
return viewBindingFactory(thisRef.requireView()).also { this.binding = it }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue