瀏覽代碼

Don't use isAttachedToWindow

Janic Duplessis 4 年之前
父節點
當前提交
698dbfee9e
共有 1 個檔案被更改,包括 0 行新增4 行删除
  1. 0
    4
      android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.java

+ 0
- 4
android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaView.java 查看文件

@@ -77,10 +77,6 @@ public class SafeAreaView extends ReactViewGroup implements ViewTreeObserver.OnG
77 77
   }
78 78
 
79 79
   private void maybeUpdateInsets() {
80
-    if (!isAttachedToWindow()) {
81
-      return;
82
-    }
83
-
84 80
     EdgeInsets edgeInsets = getSafeAreaInsets();
85 81
     if (mLastInsets == null || !mLastInsets.equalsToEdgeInsets(edgeInsets)) {
86 82
       Assertions.assertNotNull(mInsetsChangeListener).onInsetsChange(this, edgeInsets);