mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +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;
|
||||
}
|
||||
|
||||
get lastUsed() {
|
||||
return this._sessionInfo.lastUsed;
|
||||
get sessionInfo() {
|
||||
return this._sessionInfo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ export default class SessionPickerViewModel {
|
||||
this._storageFactory = storageFactory;
|
||||
this._sessionStore = sessionStore;
|
||||
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() {
|
||||
@ -60,9 +60,9 @@ export default class SessionPickerViewModel {
|
||||
}
|
||||
|
||||
pick(id) {
|
||||
const session = this._sessions.array.find(s => s.id === id);
|
||||
if (session) {
|
||||
this._sessionCallback(session);
|
||||
const sessionVM = this._sessions.array.find(s => s.id === id);
|
||||
if (sessionVM) {
|
||||
this._sessionCallback(sessionVM.sessionInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user