New room list: fix missing/incorrect notification decoration (#29796)
* fix: recompute notification when room change in room list item vm * test: add use case when room list change * test(e2e): add screenshot to unread filter test
This commit is contained in:
@@ -92,6 +92,11 @@ export function useRoomListItemViewModel(room: Room): RoomListItemViewState {
|
||||
setNotificationValues(getNotificationValues(notificationState));
|
||||
});
|
||||
|
||||
// If the notification reference change due to room change, update the values
|
||||
useEffect(() => {
|
||||
setNotificationValues(getNotificationValues(notificationState));
|
||||
}, [notificationState]);
|
||||
|
||||
// We don't want to show the hover menu if
|
||||
// - there is an invitation for this room
|
||||
// - the user doesn't have access to both notification and more options menus
|
||||
|
||||
Reference in New Issue
Block a user