Commit 2859a563 authored by Zachary Anderson's avatar Zachary Anderson Committed by GitHub

[Fuchsia] Fix view reassemble trigger after hot reload (#12151)

parent 88cd043d
...@@ -134,7 +134,8 @@ class FuchsiaReloadCommand extends FlutterCommand { ...@@ -134,7 +134,8 @@ class FuchsiaReloadCommand extends FlutterCommand {
final List<Uri> observatoryUris = fullAddresses.map( final List<Uri> observatoryUris = fullAddresses.map(
(String a) => Uri.parse('http://$a') (String a) => Uri.parse('http://$a')
).toList(); ).toList();
final FuchsiaDevice device = new FuchsiaDevice(fullAddresses[0]); final FuchsiaDevice device = new FuchsiaDevice(
fullAddresses[0], name: _address);
final FlutterDevice flutterDevice = new FlutterDevice(device); final FlutterDevice flutterDevice = new FlutterDevice(device);
flutterDevice.observatoryUris = observatoryUris; flutterDevice.observatoryUris = observatoryUris;
final HotRunner hotRunner = new HotRunner( final HotRunner hotRunner = new HotRunner(
......
...@@ -549,8 +549,12 @@ class HotRunner extends ResidentRunner { ...@@ -549,8 +549,12 @@ class HotRunner extends ResidentRunner {
reassembleTimer.start(); reassembleTimer.start();
// Reload the isolate. // Reload the isolate.
for (FlutterDevice device in flutterDevices) { 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 view.uiIsolate.reload();
}
await device.refreshViews();
} }
// We are now running from source. // We are now running from source.
_runningFromSnapshot = false; _runningFromSnapshot = false;
......
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