Skip to content

Commit

Permalink
add log when nextcloud login web view
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-convertino committed Jun 12, 2023
1 parent fd53a5d commit f3ef01d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/bloc/web_viewer/web_viewer_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:otp_manager/bloc/web_viewer/web_viewer_state.dart';
import 'package:otp_manager/models/user.dart';
import 'package:webview_flutter/webview_flutter.dart';

import '../../main.dart' show logger;
import '../../repository/local_repository.dart';
import '../../routing/constants.dart';
import '../../routing/navigation_service.dart';
Expand Down Expand Up @@ -94,10 +95,12 @@ class WebViewerBloc extends Bloc<WebViewerEvent, WebViewerState> {
.timeout(const Duration(seconds: 10))
.catchError((error, stackTrace) {
if (error is TimeoutException) {
logger.e(error);
emit(
state.copyWith(error: "The server is taking too time to respond!"));
_navigationService.goBack();
} else {
logger.e(error);
emit(state.copyWith(
error: "The url is not of a valid nextcloud server!"));
_navigationService.goBack();
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.2.11+7
version: 1.2.12+8

environment:
sdk: ">=2.16.2 <3.0.0"
Expand Down

0 comments on commit f3ef01d

Please sign in to comment.