Skip to content

Commit 0596895

Browse files
committed
fix(new room list): fix outdated message preview when space change
1 parent 308f892 commit 0596895

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/viewmodels/roomlist/RoomListItemViewModel.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ function useRoomMessagePreview(room: Room): string | undefined {
221221
roomIsDM ? DefaultTagID.DM : DefaultTagID.Untagged,
222222
);
223223
if (messagePreview) setPreviewText(messagePreview.text);
224+
else setPreviewText(undefined);
224225
}, [room, shouldShowMessagePreview]);
225226

226227
// MessagePreviewStore and the other AsyncStores need to be converted to TypedEventEmitter

0 commit comments

Comments
 (0)