Skip to content

Commit

Permalink
fix: [#174227407] Remove multiple notification (#2295)
Browse files Browse the repository at this point in the history
* [#174227407] remove all the PN before schedule

* [#174227407] remove reactotron import

* Update ts/sagas/installation.ts

Co-authored-by: Cristiano Tofani <[email protected]>
Co-authored-by: Matteo Boschi <[email protected]>
  • Loading branch information
3 people authored Oct 22, 2020
1 parent 01b28f4 commit 1b83fcb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ts/sagas/installation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
*/
import { call, Effect, put, select } from "redux-saga/effects";

import { scheduleLocalNotificationsAccessSpid } from "../boot/scheduleLocalNotifications";
import {
removeScheduledNotificationAccessSpid,
scheduleLocalNotificationsAccessSpid
} from "../boot/scheduleLocalNotifications";
import { sessionInvalid } from "../store/actions/authentication";
import { isFirstRunAfterInstallSelector } from "../store/reducers/installation";
import { deletePin } from "../utils/keychain";
Expand All @@ -27,6 +30,8 @@ export function* previousInstallationDataDeleteSaga(): Generator<
yield call(deletePin);
// invalidate the session
yield put(sessionInvalid());
// Remove all the notification already set
yield call(removeScheduledNotificationAccessSpid);
// Schedule a set of local notifications
yield call(scheduleLocalNotificationsAccessSpid);
}
Expand Down

0 comments on commit 1b83fcb

Please sign in to comment.