chore: working android build

This commit is contained in:
Nathan Walker
2020-07-26 22:27:39 -07:00
parent b00013f35e
commit 39bcc8a4ca
27 changed files with 427 additions and 421 deletions

View File

@@ -247,24 +247,23 @@ function onLivesync(args): void {
imageFetcher.clearCache();
}
}
application.on('livesync', onLivesync);
application.android.on(
'activityStarted',
<any>profile('initImageCache', (args) => {
(<any>global).NativeScriptGlobals.events.on('livesync', onLivesync);
(<any>global).NativeScriptGlobals.addEventWiring(() => {
application.android.on('activityStarted', (args) => {
if (!imageFetcher) {
initImageCache(args.activity);
} else {
imageFetcher.initCache();
}
})
);
});
});
application.android.on(
'activityStopped',
<any>profile('closeImageCache', (args) => {
(<any>global).NativeScriptGlobals.addEventWiring(() => {
application.android.on('activityStopped', (args) => {
if (imageFetcher) {
imageFetcher.closeCache();
}
})
);
});
});