diff --git a/lib/services/user_service.dart b/lib/services/user_service.dart index 142c8e131..13d085ca2 100644 --- a/lib/services/user_service.dart +++ b/lib/services/user_service.dart @@ -679,33 +679,23 @@ class UserService { } on DioError catch (e, s) { await dialog.hide(); if (e.response != null && e.response!.statusCode == 401) { - final dialogChoice = await showChoiceDialog( + await _showContactSupportDialog( context, - title: S.of(context).incorrectPasswordTitle, - body: S.of(context).pleaseTryAgain, - firstButtonLabel: S.of(context).contactSupport, - secondButtonLabel: S.of(context).ok, + S.of(context).incorrectPasswordTitle, + S.of(context).pleaseTryAgain, ); - if (dialogChoice!.action == ButtonAction.first) { - await sendLogs( - context, - S.of(context).contactSupport, - "support@ente.io", - postShare: () {}, - ); - } } else { - _logger.fine('failed to verify password', e, s); - await showErrorDialog( + _logger.severe('failed to verify password', e, s); + await _showContactSupportDialog( context, S.of(context).oops, S.of(context).verificationFailedPleaseTryAgain, ); } } catch (e, s) { - _logger.fine('failed to verify password', e, s); + _logger.severe('failed to verify password', e, s); await dialog.hide(); - await showErrorDialog( + await _showContactSupportDialog( context, S.of(context).oops, S.of(context).verificationFailedPleaseTryAgain, @@ -1174,4 +1164,26 @@ class UserService { rethrow; } } + + Future _showContactSupportDialog( + BuildContext context, + String title, + String message, + ) async { + final dialogChoice = await showChoiceDialog( + context, + title: title, + body: message, + firstButtonLabel: S.of(context).contactSupport, + secondButtonLabel: S.of(context).ok, + ); + if (dialogChoice!.action == ButtonAction.first) { + await sendLogs( + context, + S.of(context).contactSupport, + "support@ente.io", + postShare: () {}, + ); + } + } } diff --git a/plugins/clip_ggml b/plugins/clip_ggml new file mode 160000 index 000000000..e65aa597f --- /dev/null +++ b/plugins/clip_ggml @@ -0,0 +1 @@ +Subproject commit e65aa597f859081f0bc5ee3e48cf60da9548457b