Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
Do not remove views on hot restart
Browse files Browse the repository at this point in the history
  • Loading branch information
dkwingsmt committed Jan 31, 2023
1 parent 74503c6 commit e249299
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ - (void)setSemanticsEnabled:(BOOL)enabled {
}
_semanticsEnabled = enabled;

// Update all view controllers' bridge.
// Update all view controllers' bridges.
NSEnumerator* viewControllerEnumerator = [_viewControllers objectEnumerator];
FlutterViewController* nextViewController;
while ((nextViewController = [viewControllerEnumerator nextObject])) {
Expand Down Expand Up @@ -788,9 +788,6 @@ - (void)engineCallbackOnPreEngineRestart {
FlutterViewController* nextViewController;
while ((nextViewController = [viewControllerEnumerator nextObject])) {
[nextViewController onPreEngineRestart];
if (nextViewController.id != kFlutterDefaultViewId) {
[_viewControllers removeObjectForKey:@(nextViewController.id)];
}
}
}

Expand Down

0 comments on commit e249299

Please sign in to comment.