fix: activate themes on desktop
This commit is contained in:
@@ -187,10 +187,6 @@ export class DesktopManager extends ApplicationService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onExtensionsReady() {
|
|
||||||
this.webApplication.getAppState().desktopExtensionsReady();
|
|
||||||
}
|
|
||||||
|
|
||||||
desktop_requestBackupFile() {
|
desktop_requestBackupFile() {
|
||||||
return this.application!.createBackupFile(
|
return this.application!.createBackupFile(
|
||||||
undefined,
|
undefined,
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ export class ThemeManager extends ApplicationService {
|
|||||||
if (event === ApplicationEvent.SignedOut) {
|
if (event === ApplicationEvent.SignedOut) {
|
||||||
this.deactivateAllThemes();
|
this.deactivateAllThemes();
|
||||||
} else if (event === ApplicationEvent.StorageReady) {
|
} else if (event === ApplicationEvent.StorageReady) {
|
||||||
if (!this.webApplication.getDesktopService().isDesktop) {
|
|
||||||
await this.activateCachedThemes();
|
await this.activateCachedThemes();
|
||||||
|
if (!this.webApplication.getDesktopService().isDesktop) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,13 +50,6 @@ export class ThemeManager extends ApplicationService {
|
|||||||
async onAppStart() {
|
async onAppStart() {
|
||||||
super.onAppStart();
|
super.onAppStart();
|
||||||
this.registerObservers();
|
this.registerObservers();
|
||||||
this.unsubState = this.webApplication.getAppState().addObserver(
|
|
||||||
async (eventName) => {
|
|
||||||
if (eventName === AppStateEvent.DesktopExtsReady) {
|
|
||||||
this.activateCachedThemes();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async activateCachedThemes() {
|
private async activateCachedThemes() {
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ export enum AppStateEvent {
|
|||||||
EditorFocused = 5,
|
EditorFocused = 5,
|
||||||
BeganBackupDownload = 6,
|
BeganBackupDownload = 6,
|
||||||
EndedBackupDownload = 7,
|
EndedBackupDownload = 7,
|
||||||
DesktopExtsReady = 8,
|
|
||||||
WindowDidFocus = 9,
|
WindowDidFocus = 9,
|
||||||
WindowDidBlur = 10,
|
WindowDidBlur = 10,
|
||||||
};
|
};
|
||||||
@@ -309,13 +308,4 @@ export class AppState {
|
|||||||
{ success: success }
|
{ success: success }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* When the desktop appplication extension server is ready.
|
|
||||||
*/
|
|
||||||
desktopExtensionsReady() {
|
|
||||||
this.notifyEvent(
|
|
||||||
AppStateEvent.DesktopExtsReady
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ class ApplicationViewCtrl extends PureViewCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async loadApplication() {
|
async loadApplication() {
|
||||||
|
this.application!.componentManager!.setDesktopManager(
|
||||||
|
this.application!.getDesktopService()
|
||||||
|
);
|
||||||
await this.application!.prepareForLaunch({
|
await this.application!.prepareForLaunch({
|
||||||
receiveChallenge: async (challenge) => {
|
receiveChallenge: async (challenge) => {
|
||||||
this.application!.promptForChallenge(challenge);
|
this.application!.promptForChallenge(challenge);
|
||||||
@@ -67,9 +70,6 @@ class ApplicationViewCtrl extends PureViewCtrl {
|
|||||||
|
|
||||||
async onAppStart() {
|
async onAppStart() {
|
||||||
super.onAppStart();
|
super.onAppStart();
|
||||||
this.application!.componentManager!.setDesktopManager(
|
|
||||||
this.application!.getDesktopService()
|
|
||||||
);
|
|
||||||
this.setState({
|
this.setState({
|
||||||
ready: true,
|
ready: true,
|
||||||
needsUnlock: this.application!.hasPasscode()
|
needsUnlock: this.application!.hasPasscode()
|
||||||
|
|||||||
Reference in New Issue
Block a user