fixed notifications

This commit is contained in:
PhilReact 2024-10-31 17:35:47 +02:00
parent faf580607d
commit 692c942fe7

View File

@ -394,7 +394,11 @@ const handleNotificationDirect = async (directs) => {
(newestLatestTimestamp && (newestLatestTimestamp &&
newestLatestTimestamp?.timestamp > oldestLatestTimestamp?.timestamp) newestLatestTimestamp?.timestamp > oldestLatestTimestamp?.timestamp)
) { ) {
const notificationId =
"chat_notification_" +
Date.now() +
"_type=direct" +
`_from=${newestLatestTimestamp.address}`;
LocalNotifications.schedule({ LocalNotifications.schedule({
notifications: [ notifications: [
@ -426,8 +430,11 @@ const handleNotificationDirect = async (directs) => {
); );
}); });
const notificationId = "chat_notification_" + Date.now(); const notificationId =
"chat_notification_" +
Date.now() +
"_type=direct" +
`_from=${newestLatestTimestamp.address}`;
LocalNotifications.schedule({ LocalNotifications.schedule({
notifications: [ notifications: [
{ {
@ -620,11 +627,7 @@ const handleNotification = async (groups) => {
} }
] ]
}); });
if (!isMobile) {
setTimeout(() => {
chrome.notifications.clear(notificationId);
}, 7000);
}
lastGroupNotification = Date.now(); lastGroupNotification = Date.now();
} }
} }