Add error toast when service worker registration fails (#29895)
* Add error toast when service worker registration fails Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e427b71040
commit
0f783ede5e
@@ -72,7 +72,7 @@ export default abstract class BasePlatform {
|
||||
protected _favicon?: Favicon;
|
||||
|
||||
protected constructor() {
|
||||
dis.register(this.onAction);
|
||||
dis.register(this.onAction.bind(this));
|
||||
this.startUpdateCheck = this.startUpdateCheck.bind(this);
|
||||
}
|
||||
|
||||
@@ -85,14 +85,14 @@ export default abstract class BasePlatform {
|
||||
*/
|
||||
public abstract getDefaultDeviceDisplayName(): string;
|
||||
|
||||
protected onAction = (payload: ActionPayload): void => {
|
||||
protected onAction(payload: ActionPayload): void {
|
||||
switch (payload.action) {
|
||||
case "on_client_not_viable":
|
||||
case Action.OnLoggedOut:
|
||||
this.setNotificationCount(0);
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Used primarily for Analytics
|
||||
public abstract getHumanReadableName(): string;
|
||||
|
||||
Reference in New Issue
Block a user