diff --git a/ts/sagas/installation.ts b/ts/sagas/installation.ts index ea500c4bfd3..07785d2a47c 100644 --- a/ts/sagas/installation.ts +++ b/ts/sagas/installation.ts @@ -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"; @@ -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); }