fix: simplify component logic

This commit is contained in:
Mo Bitar
2020-09-24 18:52:38 -05:00
parent 6f9b669523
commit e177dcac47
11 changed files with 64 additions and 79 deletions

View File

@@ -124,6 +124,8 @@ export class PureViewCtrl<P = CtrlProps, S = CtrlState> {
this.onAppFullSync();
} else if (eventName === ApplicationEvent.KeyStatusChanged) {
this.onAppKeyChange();
} else if (eventName === ApplicationEvent.LocalDataLoaded) {
this.onLocalDataLoaded();
}
});
}
@@ -137,6 +139,10 @@ export class PureViewCtrl<P = CtrlProps, S = CtrlState> {
await this.resetState();
}
onLocalDataLoaded() {
/** Optional override */
}
async onAppLaunch() {
/** Optional override */
}