You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-13 08:02:38 +03:00
@@ -233,10 +233,9 @@ export default class RoomTile extends React.Component<IProps, IState> {
|
|||||||
|
|
||||||
if (tagId === DefaultTagID.Favourite || tagId === DefaultTagID.LowPriority) {
|
if (tagId === DefaultTagID.Favourite || tagId === DefaultTagID.LowPriority) {
|
||||||
const inverseTag = tagId === DefaultTagID.Favourite ? DefaultTagID.LowPriority : DefaultTagID.Favourite;
|
const inverseTag = tagId === DefaultTagID.Favourite ? DefaultTagID.LowPriority : DefaultTagID.Favourite;
|
||||||
const roomTags = RoomListStore.instance.getTagsForRoom(this.props.room);
|
const isApplied = RoomListStore.instance.getTagsForRoom(this.props.room).includes(tagId);
|
||||||
const isFavourite = roomTags.includes(tagId);
|
const removeTag = isApplied ? tagId : inverseTag;
|
||||||
const removeTag = isFavourite ? tagId : inverseTag;
|
const addTag = isApplied ? null : tagId;
|
||||||
const addTag = isFavourite ? null : tagId;
|
|
||||||
dis.dispatch(RoomListActions.tagRoom(
|
dis.dispatch(RoomListActions.tagRoom(
|
||||||
MatrixClientPeg.get(),
|
MatrixClientPeg.get(),
|
||||||
this.props.room,
|
this.props.room,
|
||||||
|
|||||||
Reference in New Issue
Block a user