Refactor
This commit is contained in:
parent
a2ea06a23d
commit
2c04c9a5f0
|
|
@ -168,19 +168,19 @@ Middleware<AppState> _createLoadState(
|
||||||
isFirst = false;
|
isFirst = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catchError((error) => _handleError(store, error, action.context));
|
}).catchError((Object error) => _handleError(store, error, action.context));
|
||||||
}).catchError((error) => _handleError(store, error, action.context));
|
}).catchError((Object error) => _handleError(store, error, action.context));
|
||||||
}).catchError((error) => _handleError(store, error, action.context));
|
}).catchError((Object error) => _handleError(store, error, action.context));
|
||||||
}).catchError((error) => _handleError(store, error, action.context));
|
}).catchError((Object error) => _handleError(store, error, action.context));
|
||||||
}).catchError((error) => _handleError(store, error, action.context));
|
}).catchError((Object error) => _handleError(store, error, action.context));
|
||||||
}).catchError((error) => _handleError(store, error, action.context));
|
}).catchError((Object error) => _handleError(store, error, action.context));
|
||||||
}).catchError((error) => _handleError(store, error, action.context));
|
}).catchError((Object error) => _handleError(store, error, action.context));
|
||||||
}).catchError((error) => _handleError(store, error, action.context));
|
}).catchError((Object error) => _handleError(store, error, action.context));
|
||||||
} else {
|
} else {
|
||||||
store.dispatch(UserLogout());
|
store.dispatch(UserLogout());
|
||||||
store.dispatch(LoadUserLogin(action.context));
|
store.dispatch(LoadUserLogin(action.context));
|
||||||
}
|
}
|
||||||
}).catchError((error) => _handleError(store, error, action.context));
|
}).catchError((Object error) => _handleError(store, error, action.context));
|
||||||
|
|
||||||
next(action);
|
next(action);
|
||||||
};
|
};
|
||||||
|
|
@ -217,7 +217,7 @@ List<String> _getRoutes(AppState state) {
|
||||||
return routes;
|
return routes;
|
||||||
}
|
}
|
||||||
|
|
||||||
_handleError(store, error, context) {
|
void _handleError(Store<AppState> store, Object error, BuildContext context) {
|
||||||
print(error);
|
print(error);
|
||||||
store.dispatch(UserLogout());
|
store.dispatch(UserLogout());
|
||||||
store.dispatch(LoadUserLogin(context));
|
store.dispatch(LoadUserLogin(context));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue