mirror of https://github.com/vector-im/riot-web
Better Set handling
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>pull/21833/head
parent
fbb6a42d86
commit
b8a7d5d730
|
@ -69,7 +69,7 @@ interface IState {
|
||||||
contextMenuPosition: PartialDOMRect;
|
contextMenuPosition: PartialDOMRect;
|
||||||
isDarkTheme: boolean;
|
isDarkTheme: boolean;
|
||||||
selectedSpace?: Room;
|
selectedSpace?: Room;
|
||||||
pendingRoomJoin: Set<string>
|
pendingRoomJoin: Set<string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@replaceableComponent("structures.UserMenu")
|
@replaceableComponent("structures.UserMenu")
|
||||||
|
@ -182,8 +182,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private removePendingJoinRoom(roomId: string): void {
|
private removePendingJoinRoom(roomId: string): void {
|
||||||
if (this.state.pendingRoomJoin.has(roomId)) {
|
if (this.state.pendingRoomJoin.delete(roomId)) {
|
||||||
this.state.pendingRoomJoin.delete(roomId);
|
|
||||||
this.setState({
|
this.setState({
|
||||||
pendingRoomJoin: new Set<string>(this.state.pendingRoomJoin),
|
pendingRoomJoin: new Set<string>(this.state.pendingRoomJoin),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue