diff --git a/lib/reducers/backup-reducer.js b/lib/reducers/backup-reducer.js --- a/lib/reducers/backup-reducer.js +++ b/lib/reducers/backup-reducer.js @@ -11,6 +11,7 @@ sendBackupDataToSecondaryActionTypes, restorationNotifyPeersActionType, } from '../actions/backup-actions.js'; +import { setClientDBStoreActionType } from '../actions/client-db-store-actions.js'; import { changeIdentityUserPasswordActionTypes, logOutActionTypes, @@ -88,6 +89,18 @@ } if ( + action.type === setClientDBStoreActionType && + store.status === 'user_data_backup_started' + ) { + // This indicates that previously, the app was killed after starting + // compaction but before creation concluded. Resetting the state to trigger + // upload again. + return { + ...store, + status: 'no_backup', + payload: {}, + }; + } else if ( action.type === resetBackupRestoreStateActionType || action.type === logOutActionTypes.started ) {