Skip to content

Commit

Permalink
feat(error-interceptor): remove 300ms delay
Browse files Browse the repository at this point in the history
Signed-off-by: Taranjeet Singh <[email protected]>
  • Loading branch information
singhtaranjeet committed Aug 25, 2023
1 parent aedd501 commit dedd2a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/src/interceptors/error_interceptor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ abstract class ErrorInterceptor extends Interceptor {
final isLoginApi = checkIsLoginApi(unauthenticatedError);
// Delaying for 300ms so that other futures
// can complete before navigating to unauthorizedScreen
Future.delayed(
const Duration(milliseconds: 300),
() {
// Future.delayed(
// const Duration(milliseconds: 300),
// () {
// },
// );
if (!isLoginApi) {
handleUnauthenticatedUser(unauthenticatedError);
}
Expand All @@ -49,9 +51,7 @@ abstract class ErrorInterceptor extends Interceptor {
error: error.error,
),
);
},
);
return null;
// return null;
} else if (code == 403) {
return handler.reject(
UnauthorizedError(
Expand Down

0 comments on commit dedd2a7

Please sign in to comment.