Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3488156
D6228.id20785.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6228.id20785.diff
View Options
diff --git a/native/push/reducer.js b/native/push/reducer.js
--- a/native/push/reducer.js
+++ b/native/push/reducer.js
@@ -1,5 +1,7 @@
// @flow
+import { NativeModules } from 'react-native';
+
import {
logOutActionTypes,
deleteAccountActionTypes,
@@ -12,7 +14,6 @@
rescindAndroidNotificationActionType,
type Action,
} from '../redux/action-types';
-import { getFirebase } from './firebase';
type RecordAndroidNotificationPayload = {
+threadID: string,
@@ -59,14 +60,9 @@
[action.payload.threadID]: [...set],
};
} else if (action.type === clearAndroidNotificationsActionType) {
- if (!state[action.payload.threadID]) {
- return state;
- }
- for (const notifID of state[action.payload.threadID]) {
- getFirebase()
- .notifications()
- .android.removeDeliveredNotificationsByTag(notifID);
- }
+ NativeModules.CommAndroidNotifications.removeAllActiveNotificationsForThread(
+ action.payload.threadID,
+ );
return {
...state,
[action.payload.threadID]: [],
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 9:13 AM (21 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2676509
Default Alt Text
D6228.id20785.diff (1 KB)
Attached To
Mode
D6228: Use native modules to clear notifications for a given thread
Attached
Detach File
Event Timeline
Log In to Comment