mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
fixup for delete button changes
This commit is contained in:
parent
2fa5fa7890
commit
3ba20dece1
@ -41,8 +41,8 @@ class SessionItemViewModel extends EventEmitter {
|
|||||||
return this._sessionInfo.userId;
|
return this._sessionInfo.userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
get lastUsed() {
|
get sessionInfo() {
|
||||||
return this._sessionInfo.lastUsed;
|
return this._sessionInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ export default class SessionPickerViewModel {
|
|||||||
this._storageFactory = storageFactory;
|
this._storageFactory = storageFactory;
|
||||||
this._sessionStore = sessionStore;
|
this._sessionStore = sessionStore;
|
||||||
this._sessionCallback = sessionCallback;
|
this._sessionCallback = sessionCallback;
|
||||||
this._sessions = new SortedArray((s1, s2) => (s1.lastUsed || 0) - (s2.lastUsed || 0));
|
this._sessions = new SortedArray((s1, s2) => (s1.sessionInfo.lastUsed || 0) - (s2.sessionInfo.lastUsed || 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
@ -60,9 +60,9 @@ export default class SessionPickerViewModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pick(id) {
|
pick(id) {
|
||||||
const session = this._sessions.array.find(s => s.id === id);
|
const sessionVM = this._sessions.array.find(s => s.id === id);
|
||||||
if (session) {
|
if (sessionVM) {
|
||||||
this._sessionCallback(session);
|
this._sessionCallback(sessionVM.sessionInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user