Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit bbb11a7

Browse files
authored
Merge pull request #5339 from matrix-org/t3chguy/fix/15491
Fix case where sublist context menu missed an update
2 parents ce47856 + fefd374 commit bbb11a7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/views/rooms/RoomSublist.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ export default class RoomSublist extends React.Component<IProps, IState> {
399399
const isUnreadFirst = RoomListStore.instance.getListOrder(this.props.tagId) === ListAlgorithm.Importance;
400400
const newAlgorithm = isUnreadFirst ? ListAlgorithm.Natural : ListAlgorithm.Importance;
401401
await RoomListStore.instance.setListOrder(this.props.tagId, newAlgorithm);
402+
this.forceUpdate(); // because if the sublist doesn't have any changes then we will miss the list order change
402403
};
403404

404405
private onTagSortChanged = async (sort: SortAlgorithm) => {

0 commit comments

Comments
 (0)