Browse Source

Added missing bottomTabSelected to ScreenVisibilityListener (#4275)

Danilo Bürger 6 years ago
parent
commit
8fc1dd5769
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      src/ScreenVisibilityListener.js

+ 6
- 1
src/ScreenVisibilityListener.js View File

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