mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
apply method rename (and catch errors)
This commit is contained in:
parent
0c0e164f13
commit
ec4413550b
@ -154,7 +154,7 @@ export class SessionLoadViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
async logout() {
|
||||
await this._client.logout();
|
||||
await this._client.startLogout(this.navigation.path.get("session").value);
|
||||
this.navigation.push("session", true);
|
||||
}
|
||||
|
||||
|
@ -78,11 +78,15 @@ export class StorageFactory {
|
||||
return new Storage(db, this._idbFactory, this._IDBKeyRange, hasWebkitEarlyCloseTxnBug, this._localStorage, log.logger);
|
||||
}
|
||||
|
||||
delete(sessionId: string): Promise<IDBDatabase> {
|
||||
async delete(sessionId: string): Promise<void> {
|
||||
const databaseName = sessionName(sessionId);
|
||||
try {
|
||||
clearKeysFromLocalStorage(this._localStorage, databaseName);
|
||||
} catch (e) {}
|
||||
try {
|
||||
const req = this._idbFactory.deleteDatabase(databaseName);
|
||||
return reqAsPromise(req);
|
||||
await reqAsPromise(req);
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
async export(sessionId: string, log: ILogItem): Promise<Export> {
|
||||
|
Loading…
Reference in New Issue
Block a user