You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Fix case where sublist context menu missed an update
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -399,6 +399,7 @@ export default class RoomSublist extends React.Component<IProps, IState> {
|
|||||||
const isUnreadFirst = RoomListStore.instance.getListOrder(this.props.tagId) === ListAlgorithm.Importance;
|
const isUnreadFirst = RoomListStore.instance.getListOrder(this.props.tagId) === ListAlgorithm.Importance;
|
||||||
const newAlgorithm = isUnreadFirst ? ListAlgorithm.Natural : ListAlgorithm.Importance;
|
const newAlgorithm = isUnreadFirst ? ListAlgorithm.Natural : ListAlgorithm.Importance;
|
||||||
await RoomListStore.instance.setListOrder(this.props.tagId, newAlgorithm);
|
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) => {
|
private onTagSortChanged = async (sort: SortAlgorithm) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user