infobip-mobile-messaging-react-native-plugin 7.0.2 → 7.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,7 +85,7 @@ repositories {
85
85
  }
86
86
 
87
87
  dependencies {
88
- def mmVersion = '7.3.1'
88
+ def mmVersion = '7.6.2'
89
89
 
90
90
  implementation 'com.facebook.react:react-native:+'
91
91
  implementation "androidx.annotation:annotation:1.1.0"
@@ -50,13 +50,17 @@ class RNMMChatViewManager: RCTViewManager {
50
50
  return
51
51
  }
52
52
 
53
- let vc = MMChatViewController.makeModalViewController()
54
- parentVC.addChild(vc)
55
- addSubview(vc.view)
56
- vc.didMove(toParent: parentVC)
57
- self.viewController = vc
58
- }
59
-
53
+ guard let existingChatVC = parentVC.children.filter({ $0 is MMChatViewController }).first as? MMChatViewController else {
54
+ let newChatVC = MMChatViewController.makeModalViewController()
55
+ parentVC.addChild(newChatVC)
56
+ addSubview(newChatVC.view)
57
+ newChatVC.didMove(toParent: parentVC)
58
+ self.viewController = newChatVC
59
+ return
60
+ }
61
+ /* existingChatVC is the case of didMoveToWindow being triggered from the presentation of other view (ie RTCImageView) */
62
+ self.viewController = existingChatVC
63
+ }
60
64
  }
61
65
 
62
66
  extension UIView {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "infobip-mobile-messaging-react-native-plugin",
3
3
  "title": "Infobip Mobile Messaging React Native Plugin",
4
- "version": "7.0.2",
4
+ "version": "7.0.4",
5
5
  "description": "Infobip Mobile Messaging React Native Plugin",
6
6
  "main": "./src/index.js",
7
7
  "scripts": {
package/release.sh CHANGED
@@ -25,4 +25,4 @@ git commit -a -m "Release: $RELEASE_VERSION"
25
25
  git tag $RELEASE_VERSION -m "Release: $RELEASE_VERSION"
26
26
 
27
27
  # Push changes
28
- git push origin master --tags
28
+ git push origin $BRANCH_NAME_TO_BUILD --tags