From fefd374a3203d534817b175c7410b9f17e174252 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 19 Oct 2020 14:34:47 +0100 Subject: [PATCH] Fix case where sublist context menu missed an update Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/RoomSublist.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/views/rooms/RoomSublist.tsx b/src/components/views/rooms/RoomSublist.tsx index 4056f2fbd4..d93de47d6b 100644 --- a/src/components/views/rooms/RoomSublist.tsx +++ b/src/components/views/rooms/RoomSublist.tsx @@ -399,6 +399,7 @@ export default class RoomSublist extends React.Component { 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) => {