Daniel Zlotin 7 gadus atpakaļ
vecāks
revīzija
3b63f64a08

+ 12
- 1
ios/RNNRootViewController.m Parādīt failu

@@ -36,9 +36,20 @@
36 36
 }
37 37
 
38 38
 /**
39
- *	fix for #877
39
+ *	fix for #877, #878
40 40
  */
41 41
 -(void)onJsReload {
42
+	[self cleanReactLeftovers];
43
+}
44
+
45
+/**
46
+ * fix for #880
47
+ */
48
+-(void)dealloc {
49
+	[self cleanReactLeftovers];
50
+}
51
+
52
+-(void)cleanReactLeftovers {
42 53
 	[[NSNotificationCenter defaultCenter] removeObserver:self];
43 54
 	[[NSNotificationCenter defaultCenter] removeObserver:self.view];
44 55
 	self.view = nil;

+ 0
- 22
ios/ReactNativeNavigation.m Parādīt failu

@@ -79,7 +79,6 @@
79 79
 # pragma mark - js events
80 80
 
81 81
 -(void)onJavaScriptWillLoad {
82
-	[self releaseBeforeJSReload];
83 82
 	[_store clean];
84 83
 }
85 84
 
@@ -105,25 +104,4 @@
105 104
 											   object:nil];
106 105
 }
107 106
 
108
--(void)releaseBeforeJSReload {
109
-#ifdef DEBUG
110
-//	if(![UIApplication.sharedApplication.delegate.window.rootViewController isKindOfClass:[RNNSplashScreen class]]) {
111
-//		[self releaseBeforeJsReload:UIApplication.sharedApplication.delegate.window.rootViewController];
112
-//	}
113
-#endif
114
-}
115
-
116
-//-(void)releaseBeforeJsReload:(UIViewController*)vc {
117
-//	if(!vc) return;
118
-//	
119
-//	for (UIViewController* child in vc.childViewControllers) {
120
-//		[self releaseBeforeJsReload:child];
121
-//	}
122
-//	[self releaseBeforeJsReload:vc.presentedViewController];
123
-//	
124
-//	[NSNotificationCenter.defaultCenter removeObserver:vc];
125
-//	[NSNotificationCenter.defaultCenter removeObserver:vc.view];
126
-//	vc.view = nil;
127
-//}
128
-
129 107
 @end

+ 1
- 6
playground/src/containers/ModalScreen.js Parādīt failu

@@ -69,12 +69,7 @@ class ModalScreen extends Component {
69 69
   }
70 70
 
71 71
   onClickDismissAllModals() {
72
-    // Navigation.dismissAllModals();
73
-    Navigation.setRoot({
74
-      container: {
75
-        name: 'navigation.playground.WelcomeScreen'
76
-      }
77
-    });
72
+    Navigation.dismissAllModals();
78 73
   }
79 74
 
80 75
   getModalPosition() {