Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Show option to contact support when verification fails

vishnukvmd4278dcc10233
diff --git a/lib/services/user_service.dart b/lib/services/user_service.dart
index 142c8e1318..13d085ca24 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,
- 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<void> _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,
+ postShare: () {},
+ );
+ }
+ }
}
diff --git a/plugins/clip_ggml b/plugins/clip_ggml
new file mode 160000
index 0000000000..e65aa597f8
--- /dev/null
+++ b/plugins/clip_ggml
@@ -0,0 +1 @@
+Subproject commit e65aa597f859081f0bc5ee3e48cf60da9548457b