fix notification not working for selected room (#1864)
This commit is contained in:
parent
96222de5bc
commit
8ed78d48fb
2 changed files with 4 additions and 6 deletions
|
@ -183,17 +183,17 @@ function MessageNotifications() {
|
||||||
removed,
|
removed,
|
||||||
data
|
data
|
||||||
) => {
|
) => {
|
||||||
|
if (mx.getSyncState() !== 'SYNCING') return;
|
||||||
|
if (document.hasFocus() && (selectedRoomId === room?.roomId || notificationSelected)) return;
|
||||||
if (
|
if (
|
||||||
mx.getSyncState() !== 'SYNCING' ||
|
|
||||||
selectedRoomId === room?.roomId ||
|
|
||||||
notificationSelected ||
|
|
||||||
!room ||
|
!room ||
|
||||||
!data.liveEvent ||
|
!data.liveEvent ||
|
||||||
room.isSpaceRoom() ||
|
room.isSpaceRoom() ||
|
||||||
!isNotificationEvent(mEvent) ||
|
!isNotificationEvent(mEvent) ||
|
||||||
getNotificationType(mx, room.roomId) === NotificationType.Mute
|
getNotificationType(mx, room.roomId) === NotificationType.Mute
|
||||||
)
|
) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const sender = mEvent.getSender();
|
const sender = mEvent.getSender();
|
||||||
const eventId = mEvent.getId();
|
const eventId = mEvent.getId();
|
||||||
|
|
|
@ -16,11 +16,9 @@ import * as css from './UnverifiedTab.css';
|
||||||
export function UnverifiedTab() {
|
export function UnverifiedTab() {
|
||||||
const mx = useMatrixClient();
|
const mx = useMatrixClient();
|
||||||
const deviceList = useDeviceList();
|
const deviceList = useDeviceList();
|
||||||
console.log(deviceList);
|
|
||||||
const unverified = deviceList?.filter(
|
const unverified = deviceList?.filter(
|
||||||
(device) => isCrossVerified(mx, device.device_id) === false
|
(device) => isCrossVerified(mx, device.device_id) === false
|
||||||
);
|
);
|
||||||
console.log(unverified);
|
|
||||||
|
|
||||||
if (!unverified?.length) return null;
|
if (!unverified?.length) return null;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue