mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 05:04:57 +08:00
Merge pull request #11052 from vector-im/dbkr/persist_storage_on_desktop
Request persistent storage on Electron
This commit is contained in:
commit
9981f897a4
@ -100,6 +100,16 @@ export default class ElectronPlatform extends VectorBasePlatform {
|
||||
|
||||
this.startUpdateCheck = this.startUpdateCheck.bind(this);
|
||||
this.stopUpdateCheck = this.stopUpdateCheck.bind(this);
|
||||
|
||||
this._tryPersistStorage();
|
||||
}
|
||||
|
||||
async _tryPersistStorage() {
|
||||
if (navigator.storage && navigator.storage.persist) {
|
||||
const granted = await navigator.storage.persist();
|
||||
const persisted = await navigator.storage.persisted();
|
||||
console.log("Storage persist request granted: " + granted + " persisted: " + persisted);
|
||||
}
|
||||
}
|
||||
|
||||
async getConfig(): Promise<{}> {
|
||||
|
Loading…
Reference in New Issue
Block a user