mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
let loadMembers use own txn in case members haven't been fetched yet
if they haven't, it will need a network request, meaning that the txn will get closed, so we can't reuse it afterwards
This commit is contained in:
parent
50b6ee91d7
commit
f18520a2fe
@ -116,13 +116,12 @@ export class DeviceTracker {
|
||||
if (room.isTrackingMembers || !room.isEncrypted) {
|
||||
return;
|
||||
}
|
||||
const memberList = await room.loadMemberList(undefined, log);
|
||||
const txn = await this._storage.readWriteTxn([
|
||||
this._storage.storeNames.roomSummary,
|
||||
this._storage.storeNames.userIdentities,
|
||||
]);
|
||||
let memberList;
|
||||
try {
|
||||
memberList = await room.loadMemberList(txn, log);
|
||||
let isTrackingChanges;
|
||||
try {
|
||||
isTrackingChanges = room.writeIsTrackingMembers(true, txn);
|
||||
@ -140,7 +139,7 @@ export class DeviceTracker {
|
||||
await txn.complete();
|
||||
room.applyIsTrackingMembersChanges(isTrackingChanges);
|
||||
} finally {
|
||||
memberList?.release();
|
||||
memberList.release();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user