Skip to content

Commit

Permalink
Call setUpDrawer if binding is already initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
theMr17 committed Dec 19, 2023
1 parent b86a47b commit 15254b9
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,21 @@ class NavigationDrawerFragmentPresenter @Inject constructor(
this.drawerLayout = drawerLayout
this.toolbar = toolbar
this.menuItemId = menuItemId

/**
* [setUpDrawer] is called directly if binding is already initialized.
* Otherwise, [setUpDrawer] is called from [handleCreateView].
*
* Note: [binding] is already initialized when [initializeDrawer] is called via [onRestart]
* and [handleCreateView] will not be called in that case.
*/
if (this::binding.isInitialized) {
setUpDrawer(
this.drawerLayout,
this.toolbar,
this.menuItemId
)
}
}

/**
Expand Down

0 comments on commit 15254b9

Please sign in to comment.