From f224282a27a10982fda163827b8a97bb37bd87f3 Mon Sep 17 00:00:00 2001 From: Roman Musin Date: Sat, 27 Nov 2021 16:22:30 +0000 Subject: [PATCH] Android: Fixes #5216: Alarms were not being triggered in some cases (#5798) --- packages/app-mobile/package-lock.json | 19 +++++++------------ packages/app-mobile/package.json | 2 +- .../services/AlarmServiceDriver.android.ts | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/packages/app-mobile/package-lock.json b/packages/app-mobile/package-lock.json index 570f9cce1..9512f4ec0 100644 --- a/packages/app-mobile/package-lock.json +++ b/packages/app-mobile/package-lock.json @@ -20,7 +20,7 @@ "constants-browserify": "^1.0.0", "crypto-browserify": "^3.12.0", "events": "^3.2.0", - "joplin-rn-alarm-notification": "^1.0.3", + "joplin-rn-alarm-notification": "^1.0.5", "jsc-android": "241213.1.0", "md5": "^2.2.1", "prop-types": "^15.6.0", @@ -6890,13 +6890,9 @@ } }, "node_modules/joplin-rn-alarm-notification": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/joplin-rn-alarm-notification/-/joplin-rn-alarm-notification-1.0.3.tgz", - "integrity": "sha512-HZGDrLmYf6aMVgzk02w4DS9CjaTogE1hnOLdMDsrWkZzRskO6g3bZw+Bwlc63cCX4ZLZeeWIaABzHoWKAbLzpQ==", - "peerDependencies": { - "react": "^16.8.1", - "react-native": ">=0.60.0-rc.0 <1.0.x" - } + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/joplin-rn-alarm-notification/-/joplin-rn-alarm-notification-1.0.5.tgz", + "integrity": "sha512-Gs07X+kjSB1HN87LEFcicihwcZqwcdiiZFFyXKaxUxukIeM/WGUuyu2I6vgiR8Tuxlw/bEYNvkMLwCb8pA2PgA==" }, "node_modules/js-tokens": { "version": "4.0.0", @@ -17953,10 +17949,9 @@ } }, "joplin-rn-alarm-notification": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/joplin-rn-alarm-notification/-/joplin-rn-alarm-notification-1.0.3.tgz", - "integrity": "sha512-HZGDrLmYf6aMVgzk02w4DS9CjaTogE1hnOLdMDsrWkZzRskO6g3bZw+Bwlc63cCX4ZLZeeWIaABzHoWKAbLzpQ==", - "requires": {} + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/joplin-rn-alarm-notification/-/joplin-rn-alarm-notification-1.0.5.tgz", + "integrity": "sha512-Gs07X+kjSB1HN87LEFcicihwcZqwcdiiZFFyXKaxUxukIeM/WGUuyu2I6vgiR8Tuxlw/bEYNvkMLwCb8pA2PgA==" }, "js-tokens": { "version": "4.0.0", diff --git a/packages/app-mobile/package.json b/packages/app-mobile/package.json index dec435d7e..4715edf63 100644 --- a/packages/app-mobile/package.json +++ b/packages/app-mobile/package.json @@ -28,7 +28,7 @@ "constants-browserify": "^1.0.0", "crypto-browserify": "^3.12.0", "events": "^3.2.0", - "joplin-rn-alarm-notification": "^1.0.3", + "joplin-rn-alarm-notification": "^1.0.5", "jsc-android": "241213.1.0", "md5": "^2.2.1", "prop-types": "^15.6.0", diff --git a/packages/app-mobile/services/AlarmServiceDriver.android.ts b/packages/app-mobile/services/AlarmServiceDriver.android.ts index 7c55ea5cf..a13b03504 100644 --- a/packages/app-mobile/services/AlarmServiceDriver.android.ts +++ b/packages/app-mobile/services/AlarmServiceDriver.android.ts @@ -56,7 +56,7 @@ export default class AlarmServiceDriver { small_icon: 'ic_launcher_foreground', // Android requires the icon to be transparent color: 'blue', data: { - joplinNotificationId: `${notification.id}`, + joplinNotificationId: notification.id, noteId: notification.noteId, }, };