Threads notifications after app startup (#7253)
This commit is contained in:
parent
b4b81a455e
commit
38e5e94ee4
10 changed files with 194 additions and 28 deletions
|
@ -38,8 +38,8 @@ import { ContextMenuTooltipButton } from '../../structures/ContextMenu';
|
|||
import RoomContextMenu from "../context_menus/RoomContextMenu";
|
||||
import { contextMenuBelow } from './RoomTile';
|
||||
import { RoomNotificationStateStore } from '../../../stores/notifications/RoomNotificationStateStore';
|
||||
import { NOTIFICATION_STATE_UPDATE } from '../../../stores/notifications/NotificationState';
|
||||
import { RightPanelPhases } from '../../../stores/RightPanelStorePhases';
|
||||
import { NotificationStateEvents } from '../../../stores/notifications/NotificationState';
|
||||
|
||||
export interface ISearchInfo {
|
||||
searchTerm: string;
|
||||
|
@ -76,7 +76,7 @@ export default class RoomHeader extends React.Component<IProps, IState> {
|
|||
constructor(props, context) {
|
||||
super(props, context);
|
||||
const notiStore = RoomNotificationStateStore.instance.getRoomState(props.room);
|
||||
notiStore.on(NOTIFICATION_STATE_UPDATE, this.onNotificationUpdate);
|
||||
notiStore.on(NotificationStateEvents.Update, this.onNotificationUpdate);
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ export default class RoomHeader extends React.Component<IProps, IState> {
|
|||
cli.removeListener("RoomState.events", this.onRoomStateEvents);
|
||||
}
|
||||
const notiStore = RoomNotificationStateStore.instance.getRoomState(this.props.room);
|
||||
notiStore.removeListener(NOTIFICATION_STATE_UPDATE, this.onNotificationUpdate);
|
||||
notiStore.removeListener(NotificationStateEvents.Update, this.onNotificationUpdate);
|
||||
}
|
||||
|
||||
private onRoomStateEvents = (event: MatrixEvent, state: RoomState) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue