forked from mystiq/hydrogen-web
Make loadPowerLevels private
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
22fab3761a
commit
14c00f50fc
1 changed files with 2 additions and 2 deletions
|
@ -390,7 +390,7 @@ export class BaseRoom extends EventEmitter {
|
||||||
return this._summary.data.membership;
|
return this._summary.data.membership;
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadPowerLevels() {
|
async _loadPowerLevels() {
|
||||||
const txn = await this._storage.readTxn([this._storage.storeNames.roomState]);
|
const txn = await this._storage.readTxn([this._storage.storeNames.roomState]);
|
||||||
const powerLevelsState = await txn.roomState.get(this._roomId, "m.room.power_levels", "");
|
const powerLevelsState = await txn.roomState.get(this._roomId, "m.room.power_levels", "");
|
||||||
if (powerLevelsState) {
|
if (powerLevelsState) {
|
||||||
|
@ -416,7 +416,7 @@ export class BaseRoom extends EventEmitter {
|
||||||
async observePowerLevels() {
|
async observePowerLevels() {
|
||||||
let observable = this._powerLevels;
|
let observable = this._powerLevels;
|
||||||
if (!observable) {
|
if (!observable) {
|
||||||
const powerLevels = await this.loadPowerLevels();
|
const powerLevels = await this._loadPowerLevels();
|
||||||
observable = new RetainedObservableValue(powerLevels, () => { this._powerLevels = null; });
|
observable = new RetainedObservableValue(powerLevels, () => { this._powerLevels = null; });
|
||||||
this._powerLevels = observable;
|
this._powerLevels = observable;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue