Clear AP history when purging data
This commit is contained in:
parent
2def694c7d
commit
0fdd21fa86
|
|
@ -441,13 +441,14 @@ Middleware<AppState> _purgeData(AuthRepository repository) {
|
|||
NextDispatcher next) async {
|
||||
final action = dynamicAction as PurgeDataRequest;
|
||||
final state = store.state;
|
||||
final company = state.company;
|
||||
|
||||
repository
|
||||
.purgeData(
|
||||
credentials: state.credentials,
|
||||
password: action.password,
|
||||
idToken: action.idToken,
|
||||
companyId: state.company.id)
|
||||
companyId: company.id)
|
||||
.then((dynamic value) {
|
||||
store.dispatch(PurgeDataSuccess());
|
||||
store.dispatch(RefreshData(
|
||||
|
|
|
|||
|
|
@ -435,6 +435,10 @@ CompanyPrefState companyPrefReducer(CompanyPrefState state, dynamic action) {
|
|||
}
|
||||
|
||||
Reducer<BuiltList<HistoryRecord>> historyReducer = combineReducers([
|
||||
TypedReducer<BuiltList<HistoryRecord>, PurgeDataSuccess>(
|
||||
(historyList, action) {
|
||||
return BuiltList<HistoryRecord>();
|
||||
}),
|
||||
TypedReducer<BuiltList<HistoryRecord>, PopLastHistory>(
|
||||
(historyList, action) {
|
||||
if (historyList.isEmpty) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue