Skip to content

Commit

Permalink
Compat with RN 0.59 on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
janicduplessis committed Jun 9, 2020
1 parent 43cb259 commit 883bc24
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,21 @@ private void resetInsets(SafeAreaViewMode mode) {
}
}

@Override
public void onBeforeLayout(NativeViewHierarchyOptimizer nativeViewHierarchyOptimizer) {
// The signature for onBeforeLayout is different in RN 0.59.
// Remove when we drop support for this version and add back @Override and super call to
// onBeforeLayout(NativeViewHierarchyOptimizer).
public void onBeforeLayout() {
if (mNeedsUpdate) {
mNeedsUpdate = false;
updateInsets();
}
}

super.onBeforeLayout(nativeViewHierarchyOptimizer);
public void onBeforeLayout(NativeViewHierarchyOptimizer nativeViewHierarchyOptimizer) {
if (mNeedsUpdate) {
mNeedsUpdate = false;
updateInsets();
}
}

@Override
Expand Down

0 comments on commit 883bc24

Please sign in to comment.