mirror of https://github.com/vector-im/riot-web
Merge branch 'develop' into travis/room-list/breadcrumbs
commit
b5f9c4ba8a
|
@ -31,6 +31,7 @@ import { MatrixEvent } from "matrix-js-sdk/src/models/event";
|
||||||
import ActiveRoomObserver from "../../../ActiveRoomObserver";
|
import ActiveRoomObserver from "../../../ActiveRoomObserver";
|
||||||
import { EventEmitter } from "events";
|
import { EventEmitter } from "events";
|
||||||
import { arrayDiff } from "../../../utils/arrays";
|
import { arrayDiff } from "../../../utils/arrays";
|
||||||
|
import { IDestroyable } from "../../../utils/IDestroyable";
|
||||||
|
|
||||||
export const NOTIFICATION_STATE_UPDATE = "update";
|
export const NOTIFICATION_STATE_UPDATE = "update";
|
||||||
|
|
||||||
|
@ -106,7 +107,7 @@ export default class NotificationBadge extends React.PureComponent<IProps, IStat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RoomNotificationState extends EventEmitter {
|
export class RoomNotificationState extends EventEmitter implements IDestroyable {
|
||||||
private _symbol: string;
|
private _symbol: string;
|
||||||
private _count: number;
|
private _count: number;
|
||||||
private _color: NotificationColor;
|
private _color: NotificationColor;
|
||||||
|
|
|
@ -20,13 +20,13 @@ import { Group } from "matrix-js-sdk/src/models/group";
|
||||||
import { EventEmitter } from "events";
|
import { EventEmitter } from "events";
|
||||||
import GroupStore from "../../GroupStore";
|
import GroupStore from "../../GroupStore";
|
||||||
import { arrayHasDiff } from "../../../utils/arrays";
|
import { arrayHasDiff } from "../../../utils/arrays";
|
||||||
import { IDisposable } from "../../../utils/IDisposable";
|
import { IDestroyable } from "../../../utils/IDestroyable";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A filter condition for the room list which reveals rooms which
|
* A filter condition for the room list which reveals rooms which
|
||||||
* are a member of a given community.
|
* are a member of a given community.
|
||||||
*/
|
*/
|
||||||
export class CommunityFilterCondition extends EventEmitter implements IFilterCondition, IDisposable {
|
export class CommunityFilterCondition extends EventEmitter implements IFilterCondition, IDestroyable {
|
||||||
private roomIds: string[] = [];
|
private roomIds: string[] = [];
|
||||||
|
|
||||||
constructor(private community: Group) {
|
constructor(private community: Group) {
|
||||||
|
@ -57,7 +57,7 @@ export class CommunityFilterCondition extends EventEmitter implements IFilterCon
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public dispose(): void {
|
public destroy(): void {
|
||||||
GroupStore.off("update", this.onStoreUpdate);
|
GroupStore.off("update", this.onStoreUpdate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,6 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export interface IDisposable {
|
export interface IDestroyable {
|
||||||
dispose(): void;
|
destroy(): void;
|
||||||
}
|
}
|
Loading…
Reference in New Issue