Page MenuHomePhabricator

D6228.id20785.diff
No OneTemporary

D6228.id20785.diff

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

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)

Event Timeline