Skip to content

Commit

Permalink
[Fuchsia] Fix view reassemble trigger after hot reload (flutter#12151)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanderso committed Sep 18, 2017
1 parent 88cd043 commit 2859a56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/flutter_tools/lib/src/commands/fuchsia_reload.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ class FuchsiaReloadCommand extends FlutterCommand {
final List<Uri> observatoryUris = fullAddresses.map(
(String a) => Uri.parse('http://$a')
).toList();
final FuchsiaDevice device = new FuchsiaDevice(fullAddresses[0]);
final FuchsiaDevice device = new FuchsiaDevice(
fullAddresses[0], name: _address);
final FlutterDevice flutterDevice = new FlutterDevice(device);
flutterDevice.observatoryUris = observatoryUris;
final HotRunner hotRunner = new HotRunner(
Expand Down
6 changes: 5 additions & 1 deletion packages/flutter_tools/lib/src/run_hot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,12 @@ class HotRunner extends ResidentRunner {
reassembleTimer.start();
// Reload the isolate.
for (FlutterDevice device in flutterDevices) {
for (FlutterView view in device.views)
printTrace('Sending reload events to ${device.device.name}');
for (FlutterView view in device.views) {
printTrace('Sending reload event to "${view.uiIsolate.name}"');
await view.uiIsolate.reload();
}
await device.refreshViews();
}
// We are now running from source.
_runningFromSnapshot = false;
Expand Down

0 comments on commit 2859a56

Please sign in to comment.