Skip to content

Commit

Permalink
Cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
j-piasecki committed May 7, 2024
1 parent 0639f94 commit 2407494
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public void setStateWrapper(StateWrapper stateWrapper) {
public void updateState() {
this.updateState(mOpened, mDrawerPosition == Gravity.START, PixelUtil.toDIPFromPixel(getWidth()), PixelUtil.toDIPFromPixel(mDrawerWidth));
}

private void updateState(boolean isOpen, boolean onLeft, float containerWidth, float drawerWidth) {
if (this.mStateWrapper == null) {
return;
Expand Down Expand Up @@ -183,7 +184,7 @@ private void updateState(boolean isOpen, boolean onLeft, float containerWidth, f
stateDrawerWidth = currentState.getDouble("drawerWidth");
}

if (isOpen != stateDrawerOpened || onLeft != stateOnLeft || Math.abs(stateContainerWidth - containerWidth) > delta || Math.abs(stateDrawerWidth - drawerWidth) > delta) {
if (isOpen != stateDrawerOpened || onLeft != stateOnLeft || Math.abs(stateContainerWidth - containerWidth) > delta || Math.abs(stateDrawerWidth - drawerWidth) > delta) {
WritableNativeMap newState = new WritableNativeMap();
newState.putBoolean("drawerOnLeft", onLeft);
newState.putBoolean("drawerOpened", isOpen);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ class AndroidDrawerLayoutState final {
MapBuffer getMapBuffer() const {
return MapBufferBuilder::EMPTY();
};

#pragma mark - Getters
};

} // namespace facebook::react

0 comments on commit 2407494

Please sign in to comment.