New room list: fix outdated message preview when space or filter change (#29925)
* fix(new room list): fix outdated message preview when space change * test(new room list): verify that message preview is check when room change
This commit is contained in:
@@ -220,7 +220,7 @@ function useRoomMessagePreview(room: Room): string | undefined {
|
||||
room,
|
||||
roomIsDM ? DefaultTagID.DM : DefaultTagID.Untagged,
|
||||
);
|
||||
if (messagePreview) setPreviewText(messagePreview.text);
|
||||
setPreviewText(messagePreview?.text);
|
||||
}, [room, shouldShowMessagePreview]);
|
||||
|
||||
// MessagePreviewStore and the other AsyncStores need to be converted to TypedEventEmitter
|
||||
|
||||
Reference in New Issue
Block a user