Skip to content

Commit

Permalink
Fix bug with bottom sheet behavior null onConfigChange (#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
danesfeder authored Nov 13, 2017
1 parent ba61f23 commit ec0f0e9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ public void onStyleLoaded(String style) {
initLifecycleObservers();
initNavigationPresenter();
initClickListeners();
initSummaryBottomSheet();
subscribeViews();
navigationListener.onNavigationReady();
}
Expand Down Expand Up @@ -313,6 +312,7 @@ private void init() {
inflate(getContext(), R.layout.navigation_view_layout, this);
bind();
initViewModels();
initSummaryBottomSheet();
}

/**
Expand Down Expand Up @@ -422,7 +422,7 @@ private void initSummaryBottomSheet() {
summaryBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
@Override
public void onStateChanged(@NonNull View bottomSheet, int newState) {
if (newState == BottomSheetBehavior.STATE_HIDDEN) {
if (newState == BottomSheetBehavior.STATE_HIDDEN && navigationPresenter != null) {
navigationPresenter.onSummaryBottomSheetHidden();
}
}
Expand Down

0 comments on commit ec0f0e9

Please sign in to comment.