Skip to content

Commit

Permalink
fix notification not working for selected room (#1864)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbura authored Aug 4, 2024
1 parent 96222de commit 8ed78d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/app/pages/client/ClientNonUIFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,17 @@ function MessageNotifications() {
removed,
data
) => {
if (mx.getSyncState() !== 'SYNCING') return;
if (document.hasFocus() && (selectedRoomId === room?.roomId || notificationSelected)) return;
if (
mx.getSyncState() !== 'SYNCING' ||
selectedRoomId === room?.roomId ||
notificationSelected ||
!room ||
!data.liveEvent ||
room.isSpaceRoom() ||
!isNotificationEvent(mEvent) ||
getNotificationType(mx, room.roomId) === NotificationType.Mute
)
) {
return;
}

const sender = mEvent.getSender();
const eventId = mEvent.getId();
Expand Down
2 changes: 0 additions & 2 deletions src/app/pages/client/sidebar/UnverifiedTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ import * as css from './UnverifiedTab.css';
export function UnverifiedTab() {
const mx = useMatrixClient();
const deviceList = useDeviceList();
console.log(deviceList);
const unverified = deviceList?.filter(
(device) => isCrossVerified(mx, device.device_id) === false
);
console.log(unverified);

if (!unverified?.length) return null;

Expand Down

0 comments on commit 8ed78d4

Please sign in to comment.