mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix: Crash in when livesync-ing minimized app
This commit is contained in:
@@ -5,6 +5,7 @@ import view = require("ui/core/view");
|
||||
import definition = require("application");
|
||||
import enums = require("ui/enums");
|
||||
import uiUtils = require("ui/utils");
|
||||
import fileResolverModule = require("file-system/file-name-resolver");
|
||||
|
||||
global.moduleMerge(appModule, exports);
|
||||
|
||||
@@ -227,3 +228,18 @@ exports.start = function () {
|
||||
throw new Error("iOS Application already started!");
|
||||
}
|
||||
}
|
||||
|
||||
global.__onLiveSync = function () {
|
||||
if (!started) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear file resolver cache to respect newly added files.
|
||||
fileResolverModule.clearCache();
|
||||
|
||||
// Reload app.css in case it was changed.
|
||||
appModule.loadCss();
|
||||
|
||||
// Reload current page.
|
||||
frame.reloadPage();
|
||||
}
|
||||
Reference in New Issue
Block a user