fix opening an url showing the toolbar from the board view.

the slidingpanelayout doesn't call onPanelOpen/Close when the view
is currently in layout. this happens when it is first opened for the
board view and then the thread view without having a layout done.
this calls the same methods at onPanelOpen/Close to fix it when the view
has not been laid out (no dimensions).
refactor-toolbar
Floens 8 years ago
parent 145a9099a9
commit 1db5834e74
  1. 6
      Clover/app/src/main/java/org/floens/chan/ui/controller/ThreadSlideController.java

@ -122,6 +122,12 @@ public class ThreadSlideController extends Controller implements DoubleNavigatio
} }
Toolbar toolbar = ((ToolbarNavigationController) navigationController).toolbar; Toolbar toolbar = ((ToolbarNavigationController) navigationController).toolbar;
toolbar.processScrollCollapse(Toolbar.TOOLBAR_COLLAPSE_SHOW, true); toolbar.processScrollCollapse(Toolbar.TOOLBAR_COLLAPSE_SHOW, true);
if (slidingPaneLayout.getWidth() == 0) {
// It won't tell us it switched when it's not laid out yet.
leftOpen = leftController;
slideStateChanged(leftController);
}
} }
} }

Loading…
Cancel
Save