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

Commit

Permalink
Merge pull request #5339 from matrix-org/t3chguy/fix/15491
Browse files Browse the repository at this point in the history
Fix case where sublist context menu missed an update
  • Loading branch information
t3chguy authored Oct 19, 2020
2 parents ce47856 + fefd374 commit bbb11a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/views/rooms/RoomSublist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ export default class RoomSublist extends React.Component<IProps, IState> {
const isUnreadFirst = RoomListStore.instance.getListOrder(this.props.tagId) === ListAlgorithm.Importance;
const newAlgorithm = isUnreadFirst ? ListAlgorithm.Natural : ListAlgorithm.Importance;
await RoomListStore.instance.setListOrder(this.props.tagId, newAlgorithm);
this.forceUpdate(); // because if the sublist doesn't have any changes then we will miss the list order change
};

private onTagSortChanged = async (sort: SortAlgorithm) => {
Expand Down

0 comments on commit bbb11a7

Please sign in to comment.