adding some null checks

This commit is contained in:
tibbi 2022-10-12 23:13:42 +02:00
parent f70d99883c
commit 5d1759868f
2 changed files with 8 additions and 0 deletions

View File

@ -41,6 +41,10 @@ class AllAppsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
} }
fun onConfigurationChanged() { fun onConfigurationChanged() {
if (all_apps_grid == null) {
return
}
all_apps_grid.scrollToPosition(0) all_apps_grid.scrollToPosition(0)
all_apps_fastscroller.resetManualScrolling() all_apps_fastscroller.resetManualScrolling()
setupViews() setupViews()

View File

@ -45,6 +45,10 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
} }
fun onConfigurationChanged() { fun onConfigurationChanged() {
if (widgets_list == null) {
return
}
widgets_list.scrollToPosition(0) widgets_list.scrollToPosition(0)
setupViews() setupViews()