mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-29 21:51:39 +01:00
Make loadPowerLevels private
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
22fab3761a
commit
14c00f50fc
@ -390,7 +390,7 @@ export class BaseRoom extends EventEmitter {
|
||||
return this._summary.data.membership;
|
||||
}
|
||||
|
||||
async loadPowerLevels() {
|
||||
async _loadPowerLevels() {
|
||||
const txn = await this._storage.readTxn([this._storage.storeNames.roomState]);
|
||||
const powerLevelsState = await txn.roomState.get(this._roomId, "m.room.power_levels", "");
|
||||
if (powerLevelsState) {
|
||||
@ -416,7 +416,7 @@ export class BaseRoom extends EventEmitter {
|
||||
async observePowerLevels() {
|
||||
let observable = this._powerLevels;
|
||||
if (!observable) {
|
||||
const powerLevels = await this.loadPowerLevels();
|
||||
const powerLevels = await this._loadPowerLevels();
|
||||
observable = new RetainedObservableValue(powerLevels, () => { this._powerLevels = null; });
|
||||
this._powerLevels = observable;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user