mirror of
https://github.com/Qortal/qortal-mobile.git
synced 2025-04-28 13:57:52 +00:00
added notification data
This commit is contained in:
parent
a449bc7497
commit
faf580607d
@ -3127,16 +3127,18 @@ LocalNotifications.addListener('localNotificationActionPerformed', async (notifi
|
|||||||
// Handle specific notification types
|
// Handle specific notification types
|
||||||
if (isDirect) {
|
if (isDirect) {
|
||||||
const fromValue = notificationId.split('_from=')[1];
|
const fromValue = notificationId.split('_from=')[1];
|
||||||
handleDirectNotification(fromValue);
|
|
||||||
|
window.postMessage({ action: "NOTIFICATION_OPEN_DIRECT", payload: { from: fromValue } }, "*");
|
||||||
} else if (isGroup) {
|
} else if (isGroup) {
|
||||||
const fromValue = notificationId.split('_from=')[1];
|
const fromValue = notificationId.split('_from=')[1];
|
||||||
handleGroupNotification(fromValue);
|
|
||||||
|
window.postMessage({ action: "NOTIFICATION_OPEN_GROUP", payload: { from: fromValue } }, "*");
|
||||||
} else if (isGroupAnnouncement) {
|
} else if (isGroupAnnouncement) {
|
||||||
const fromValue = notificationId.split('_from=')[1];
|
const fromValue = notificationId.split('_from=')[1];
|
||||||
handleAnnouncementNotification(fromValue);
|
window.postMessage({ action: "NOTIFICATION_OPEN_ANNOUNCEMENT_GROUP", payload: { from: fromValue } }, "*");
|
||||||
} else if (isNewThreadPost) {
|
} else if (isNewThreadPost) {
|
||||||
const dataValue = notificationId.split('_data=')[1];
|
const dataValue = notificationId.split('_data=')[1];
|
||||||
const dataParsed = JSON.parse(dataValue);
|
const dataParsed = JSON.parse(dataValue);
|
||||||
handleThreadPostNotification(dataParsed);
|
window.postMessage({ action: "NOTIFICATION_OPEN_THREAD_NEW_POST", payload: { data: dataParsed } }, "*");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user