Browse Source

Handle deleted cached background

master
Eduard Kuzmenko 4 years ago
parent
commit
e3c1366d8d
  1. 3
      src/lib/appManagers/appImManager.ts

3
src/lib/appManagers/appImManager.ts

@ -171,6 +171,9 @@ export class AppImManager {
if(!isDefaultBackground) { if(!isDefaultBackground) {
appDownloadManager.cacheStorage.getFile('background-image').then(blob => { appDownloadManager.cacheStorage.getFile('background-image').then(blob => {
this.setBackground(URL.createObjectURL(blob), false); this.setBackground(URL.createObjectURL(blob), false);
}, () => { // * if NO_ENTRY_FOUND
this.setBackground('');
appStateManager.setByKey('settings.background', AppStateManager.STATE_INIT.settings.background); // * reset background
}); });
} else { } else {
this.setBackground(''); this.setBackground('');

Loading…
Cancel
Save