Commit efd7bf15 authored by Yacumima's avatar Yacumima

Merge branch 'flutter_1.5_upgrade_opt' of...

Merge branch 'flutter_1.5_upgrade_opt' of https://github.com/alibaba/flutter_boost into flutter_1.5_upgrade_opt
parents 1ebb42a9 db503d96
......@@ -71,12 +71,14 @@
- (void)pause
{
[[_engine lifecycleChannel] sendMessage:@"AppLifecycleState.pause"];
[[_engine lifecycleChannel] sendMessage:@"AppLifecycleState.paused"];
[self detach];
}
- (void)resume
{
[[_engine lifecycleChannel] sendMessage:@"AppLifecycleState.resume"];
[[_engine lifecycleChannel] sendMessage:@"AppLifecycleState.resumed"];
[(FLB2FlutterViewContainer *)_engine.viewController surfaceUpdated:YES];
}
- (void)inactive
......@@ -85,6 +87,7 @@
}
- (FlutterEngine *)engine
{
return _engine;
......
......@@ -83,7 +83,7 @@ static NSUInteger kInstanceCounter = 0;
{
kInstanceCounter++;
if(kInstanceCounter == 1){
// [FLUTTER_APP resume];
[FLUTTER_APP resume];
}
}
......@@ -91,7 +91,7 @@ static NSUInteger kInstanceCounter = 0;
{
kInstanceCounter--;
if([self.class instanceCounter] == 0){
// [FLUTTER_APP pause];
[FLUTTER_APP pause];
}
}
......@@ -165,7 +165,6 @@ static NSUInteger kInstanceCounter = 0;
[FLUTTER_APP resume];
[self surfaceUpdated:YES];
//For new page we should attach flutter view in view will appear
//for better performance.
......@@ -189,7 +188,8 @@ static NSUInteger kInstanceCounter = 0;
//Ensure flutter view is attached.
[self attatchFlutterEngine];
[self surfaceUpdated:YES];
[FLUTTER_APP resume];
[BoostMessageChannel didShowPageContainer:^(NSNumber *result) {}
pageName:_name
params:_params
......@@ -210,12 +210,14 @@ static NSUInteger kInstanceCounter = 0;
- (void)viewDidDisappear:(BOOL)animated
{
[self detatchFlutterEngine];
[super viewDidDisappear:animated];
[FLUTTER_APP resume];
[BoostMessageChannel didDisappearPageContainer:^(NSNumber *result) {}
pageName:_name
params:_params
uniqueId:self.uniqueIDString];
[super viewDidDisappear:animated];
}
- (void)installSplashScreenViewIfNecessary {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment