Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a91c2a3 authored by Kshitij's avatar Kshitij
Browse files

fix: null-check widgetFragment before cast

- In case view is not ready, fragment yielded may be null
parent 31c11260
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -153,9 +153,11 @@ class WidgetContainer(context: Context, attrs: AttributeSet?) :
    private fun updateRecyclerViewHeight() {
        mRecyclerView.post {
            val widgetFragment = mLauncher.fragmentManager.findFragmentByTag("qsb_view")
            if (widgetFragment != null) {
                (widgetFragment as WidgetFragment).setRecyclerViewHeight()
            }
        }
    }

    private fun updatePadding() {
        val insets = mLauncher.workspace.mInsets