ソースを参照

Added missing bottomTabSelected to ScreenVisibilityListener (#4275)

Danilo Bürger 6 年 前
コミット
8fc1dd5769
共有1 個のファイルを変更した6 個の追加1 個の削除を含む
  1. 6
    1
      src/ScreenVisibilityListener.js

+ 6
- 1
src/ScreenVisibilityListener.js ファイルの表示

@@ -10,11 +10,12 @@ export default class ScreenVisibilityListener {
10 10
   }
11 11
 
12 12
   register() {
13
-    const {willAppear, didAppear, willDisappear, didDisappear} = this.listeners;
13
+    const {willAppear, didAppear, willDisappear, didDisappear, bottomTabSelected} = this.listeners;
14 14
     this.willAppearSubscription = willAppear && this.emitter.addListener('willAppear', willAppear);
15 15
     this.didAppearSubscription = didAppear && this.emitter.addListener('didAppear', didAppear);
16 16
     this.willDisappearSubscription = willDisappear && this.emitter.addListener('willDisappear', willDisappear);
17 17
     this.didDisappearSubscription = didDisappear && this.emitter.addListener('didDisappear', didDisappear);
18
+    this.bottomTabSelectedSubscription = bottomTabSelected && this.emitter.addListener('bottomTabSelected', bottomTabSelected);
18 19
   }
19 20
 
20 21
   unregister() {
@@ -33,5 +34,9 @@ export default class ScreenVisibilityListener {
33 34
     if (this.didDisappearSubscription) {
34 35
       this.didDisappearSubscription.remove();
35 36
     }
37
+
38
+    if (this.bottomTabSelectedSubscription) {
39
+      this.bottomTabSelectedSubscription.remove();
40
+    }
36 41
   }
37 42
 }