diff --git a/src/renderer/components/NotificationRow.tsx b/src/renderer/components/NotificationRow.tsx index 3bd305433..7992630e1 100644 --- a/src/renderer/components/NotificationRow.tsx +++ b/src/renderer/components/NotificationRow.tsx @@ -50,7 +50,10 @@ export const NotificationRow: FC = ({ openNotification(notification); - if (settings.markAsDoneOnOpen) { + if ( + isMarkAsDoneFeatureSupported(notification.account) && + settings.markAsDoneOnOpen + ) { markNotificationsAsDone([notification]); } else { markNotificationsAsRead([notification]); diff --git a/src/renderer/hooks/useNotifications.ts b/src/renderer/hooks/useNotifications.ts index 5b377f311..08911ce98 100644 --- a/src/renderer/hooks/useNotifications.ts +++ b/src/renderer/hooks/useNotifications.ts @@ -103,13 +103,24 @@ export const useNotifications = (): NotificationsState => { try { await Promise.all( - readNotifications.map((notification) => - markNotificationThreadAsRead( - notification.id, - notification.account.hostname, - notification.account.token, - ), - ), + readNotifications.map((notification) => { + if ( + isMarkAsDoneFeatureSupported(readNotifications[0].account) && + state.settings.markAsDoneOnOpen + ) { + markNotificationThreadAsDone( + notification.id, + notification.account.hostname, + notification.account.token, + ); + } else { + markNotificationThreadAsRead( + notification.id, + notification.account.hostname, + notification.account.token, + ); + } + }), ); const updatedNotifications = removeNotifications( @@ -174,7 +185,10 @@ export const useNotifications = (): NotificationsState => { notification.account.token, ); - if (state.settings.markAsDoneOnUnsubscribe) { + if ( + isMarkAsDoneFeatureSupported(notification.account) && + state.settings.markAsDoneOnUnsubscribe + ) { await markNotificationsAsDone(state, [notification]); } else { await markNotificationsAsRead(state, [notification]);