mirror of
https://github.com/Qortal/qortal-mobile.git
synced 2025-04-28 13:57:52 +00:00
fixed notifications
This commit is contained in:
parent
faf580607d
commit
692c942fe7
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user