Remove dead & duplicated code (#11405)
* Remove dead code * Make dead code happier * DRY pickle additional data calculation * Iterate
This commit is contained in:
@@ -577,10 +577,9 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> implements
|
||||
* @param {IFilterCondition} filter The filter condition to add.
|
||||
*/
|
||||
public async addFilter(filter: IFilterCondition): Promise<void> {
|
||||
let promise = Promise.resolve();
|
||||
filter.on(FILTER_CHANGED, this.onPrefilterUpdated);
|
||||
this.prefilterConditions.push(filter);
|
||||
promise = this.recalculatePrefiltering();
|
||||
const promise = this.recalculatePrefiltering();
|
||||
promise.then(() => this.updateFn.trigger());
|
||||
}
|
||||
|
||||
|
||||
@@ -399,6 +399,4 @@ export class SlidingRoomListStoreClass extends AsyncStoreWithClient<IState> impl
|
||||
}
|
||||
|
||||
protected async onAction(payload: ActionPayload): Promise<void> {}
|
||||
|
||||
protected async onDispatchAsync(payload: ActionPayload): Promise<void> {}
|
||||
}
|
||||
|
||||
@@ -90,10 +90,6 @@ export class Algorithm extends EventEmitter {
|
||||
return this._stickyRoom ? this._stickyRoom.room : null;
|
||||
}
|
||||
|
||||
public get knownRooms(): Room[] {
|
||||
return this.rooms;
|
||||
}
|
||||
|
||||
public get hasTagSortingMap(): boolean {
|
||||
return !!this.sortAlgorithms;
|
||||
}
|
||||
|
||||
@@ -242,10 +242,6 @@ export class StopGapWidget extends EventEmitter {
|
||||
return parsed.toString().replace(/%24/g, "$");
|
||||
}
|
||||
|
||||
public get isManagedByManager(): boolean {
|
||||
return !!this.scalarToken;
|
||||
}
|
||||
|
||||
public get started(): boolean {
|
||||
return !!this.messaging;
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ export class StopGapWidgetDriver extends WidgetDriver {
|
||||
|
||||
if (!client || !roomId) throw new Error("Not in a room or not attached to a client");
|
||||
|
||||
let r: { event_id: string } | null = null; // eslint-disable-line camelcase
|
||||
let r: { event_id: string } | null;
|
||||
if (stateKey !== null) {
|
||||
// state event
|
||||
r = await client.sendStateEvent(roomId, eventType, content, stateKey);
|
||||
|
||||
Reference in New Issue
Block a user