Documentation and symbolic constants for dispatcher actions (#31278)
* Remove unreachable code `view_last_screen` is never used. * Remove unused action `user_activity_started` Nothing listens to this, so it's pointless. * Symbolic constant for `Action.UserActivity` * Define symbolic constants for more `Action`s Constants for some actions that are emitted by `Lifecycle`
This commit is contained in:
committed by
GitHub
parent
c203f02731
commit
1285b73be6
@@ -218,7 +218,7 @@ export default class ElectronPlatform extends BasePlatform {
|
||||
this.electron.send("app_onAction", payload);
|
||||
}
|
||||
|
||||
if (payload.action === "client_started") {
|
||||
if (payload.action === Action.ClientStarted) {
|
||||
this.clientStartedPromiseWithResolvers.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export default class WebPlatform extends BasePlatform {
|
||||
super.onAction(payload);
|
||||
|
||||
switch (payload.action) {
|
||||
case "client_started":
|
||||
case Action.ClientStarted:
|
||||
// Defer drawing the toast until the client is started as the lifecycle methods reset the ToastStore right before
|
||||
this.registerServiceWorkerPromise.catch(this.handleServiceWorkerRegistrationError);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user