Activate cached themes on desktop set of application path
This commit is contained in:
@@ -154,6 +154,7 @@ class DesktopManager {
|
||||
/* Used to resolve "sn://" */
|
||||
desktop_setApplicationDataPath(path) {
|
||||
this.applicationDataPath = path;
|
||||
this.$rootScope.$broadcast("desktop-did-set-application-path");
|
||||
}
|
||||
|
||||
desktop_setComponentInstallationSyncHandler(handler) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class ThemeManager {
|
||||
|
||||
constructor(componentManager, desktopManager, storageManager, passcodeManager) {
|
||||
constructor(componentManager, desktopManager, storageManager, passcodeManager, $rootScope) {
|
||||
this.componentManager = componentManager;
|
||||
this.storageManager = storageManager;
|
||||
this.desktopManager = desktopManager;
|
||||
@@ -17,11 +17,13 @@ class ThemeManager {
|
||||
this.cacheThemes();
|
||||
})
|
||||
|
||||
// The desktop application won't have its applicationDataPath until the angular document is ready,
|
||||
// so it wont be able to resolve local theme urls until thats ready
|
||||
angular.element(document).ready(() => {
|
||||
if(desktopManager.isDesktop) {
|
||||
$rootScope.$on("desktop-did-set-application-path", () => {
|
||||
this.activateCachedThemes();
|
||||
})
|
||||
} else {
|
||||
this.activateCachedThemes();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
activateCachedThemes() {
|
||||
|
||||
Reference in New Issue
Block a user