mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
Merge pull request #375 from vector-im/bwindels/fix-open-encrypted-room-inactive-txn
Load power levels before decryption closes the txn
This commit is contained in:
commit
1bb61d02de
@ -63,6 +63,7 @@ export class Timeline {
|
|||||||
// as they should only populate once the view subscribes to it
|
// as they should only populate once the view subscribes to it
|
||||||
// if they are populated already, the sender profile would be empty
|
// if they are populated already, the sender profile would be empty
|
||||||
|
|
||||||
|
this._powerLevels = await this._loadPowerLevels(txn);
|
||||||
// 30 seems to be a good amount to fill the entire screen
|
// 30 seems to be a good amount to fill the entire screen
|
||||||
const readerRequest = this._disposables.track(this._timelineReader.readFromEnd(30, txn, log));
|
const readerRequest = this._disposables.track(this._timelineReader.readFromEnd(30, txn, log));
|
||||||
try {
|
try {
|
||||||
@ -71,7 +72,7 @@ export class Timeline {
|
|||||||
} finally {
|
} finally {
|
||||||
this._disposables.disposeTracked(readerRequest);
|
this._disposables.disposeTracked(readerRequest);
|
||||||
}
|
}
|
||||||
this._powerLevels = await this._loadPowerLevels(txn);
|
// txn should be assumed to have finished here, as decryption will close it.
|
||||||
}
|
}
|
||||||
|
|
||||||
async _loadPowerLevels(txn) {
|
async _loadPowerLevels(txn) {
|
||||||
|
Loading…
Reference in New Issue
Block a user