Skip to content

Commit

Permalink
Merge pull request #1509 from matthiasn/sync-debug
Browse files Browse the repository at this point in the history
Fix Sync getting stuck
  • Loading branch information
matthiasn committed Apr 24, 2023
2 parents 05b8088 + 5866bdd commit 2fc6ac7
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 29 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]
### Changed:
- Sync assistant styling
- Upgraded dependencies

### Fixed:
- Sync getting stuck after generating new sync key and on reading sync message encrypted with old key

## [0.8.329] - 2023-04-23
### Changed:
- Upgrade flutter_quill lib

## [0.8.328] - 2023-04-23
Expand Down
3 changes: 1 addition & 2 deletions lib/pages/settings/sync/sync_assistant_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ class _SlidingTutorial extends State<SlidingTutorial> {
pageController: _pageController,
pageCount: widget.pageCount,
colors: [
styleConfig().secondaryTextColor,
styleConfig().cardColor.withOpacity(0.7),
styleConfig().cardColor,
styleConfig().secondaryTextColor,
],
child: Stack(
children: [
Expand Down
9 changes: 9 additions & 0 deletions lib/sync/inbox/process_message.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';

import 'package:cryptography/cryptography.dart';
import 'package:enough_mail/enough_mail.dart';
import 'package:flutter/foundation.dart';
import 'package:lotti/classes/config.dart';
Expand Down Expand Up @@ -116,6 +117,14 @@ Future<void> fetchByUid({
subDomain: '_fetchByUid',
);
rethrow;
} on SecretBoxAuthenticationError catch (e) {
await setLastReadUid(uid);
loggingDb.captureException(
e,
domain: 'INBOX_SERVICE',
subDomain: '_fetchByUid skipping',
);
rethrow;
} catch (e, stackTrace) {
loggingDb.captureException(
e,
Expand Down
9 changes: 1 addition & 8 deletions lib/themes/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ InputDecoration inputDecoration({
suffixIcon: suffixIcon,
label: Text(
labelText ?? '',
style: newLabelStyle().copyWith(
color: styleConfig().secondaryTextColor,
),
style: newLabelStyle(),
semanticsLabel: semanticsLabel,
),
);
Expand Down Expand Up @@ -172,11 +170,6 @@ TextStyle buttonLabelStyleLarger() => TextStyle(
fontSize: 20,
);

TextStyle settingsLabelStyle() => TextStyle(
color: styleConfig().primaryTextColor,
fontSize: fontSizeMedium,
);

TextStyle choiceLabelStyle() => TextStyle(
color: styleConfig().primaryTextColor,
fontSize: fontSizeMedium,
Expand Down
17 changes: 8 additions & 9 deletions lib/widgets/sync/imap_config_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class _ImapConfigFormState extends State<ImapConfigForm> {
return BlocBuilder<SyncConfigCubit, SyncConfigState>(
builder: (context, SyncConfigState state) {
return SizedBox(
height: 300,
height: 330,
child: state.when(
configured: (cfg, _) => ConfigForm(
formKey: formKey,
Expand Down Expand Up @@ -98,23 +98,23 @@ class ConfigForm extends StatelessWidget {
validator: FormBuilderValidators.required(),
style: inputStyle(),
keyboardAppearance: keyboardAppearance(),
decoration: InputDecoration(
decoration: inputDecoration(
labelText: localizations.settingsSyncHostLabel,
labelStyle: settingsLabelStyle(),
),
),
const SizedBox(height: 20),
FormBuilderTextField(
name: 'imap_userName',
key: const Key('imap_user_name_form_field'),
initialValue: imapConfig?.userName,
validator: FormBuilderValidators.required(),
style: inputStyle(),
keyboardAppearance: keyboardAppearance(),
decoration: InputDecoration(
decoration: inputDecoration(
labelText: localizations.settingsSyncUserLabel,
labelStyle: settingsLabelStyle(),
),
),
const SizedBox(height: 20),
FormBuilderTextField(
name: 'imap_password',
key: const Key('imap_password_form_field'),
Expand All @@ -123,21 +123,20 @@ class ConfigForm extends StatelessWidget {
validator: FormBuilderValidators.required(),
style: inputStyle(),
keyboardAppearance: keyboardAppearance(),
decoration: InputDecoration(
decoration: inputDecoration(
labelText: localizations.settingsSyncPasswordLabel,
labelStyle: settingsLabelStyle(),
),
),
const SizedBox(height: 20),
FormBuilderTextField(
name: 'imap_port',
key: const Key('imap_port_form_field'),
initialValue: imapConfig?.port.toString() ?? '993',
validator: FormBuilderValidators.integer(),
style: inputStyle(),
keyboardAppearance: keyboardAppearance(),
decoration: InputDecoration(
decoration: inputDecoration(
labelText: localizations.settingsSyncPortLabel,
labelStyle: settingsLabelStyle(),
),
),
],
Expand Down
8 changes: 4 additions & 4 deletions lib/widgets/sync/imap_config_status.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ class StatusIndicator extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
height: 24,
width: 24,
height: 30,
width: 30,
decoration: BoxDecoration(
color: statusColor,
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: statusColor,
blurRadius: 8,
spreadRadius: 2,
blurRadius: 5,
spreadRadius: 1,
)
],
),
Expand Down
10 changes: 5 additions & 5 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,10 @@ packages:
dependency: transitive
description:
name: extended_image_library
sha256: b1de389378589e4dffb3564d782373238f19064037458092c49b3043b2791b2b
sha256: "550743b43ab093aed35ef234500fcc7a304cbac1eca47b0cc991e07e88750758"
url: "https://pub.dev"
source: hosted
version: "3.4.1"
version: "3.4.2"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -989,10 +989,10 @@ packages:
dependency: "direct main"
description:
name: get_it
sha256: "290fde3a86072e4b37dbb03c07bec6126f0ecc28dad403c12ffe2e5a2d751ab7"
sha256: f9982979e3d2f286a957c04d2c3a98f55b0f0a06ffd6c5c4abbb96f06937f463
url: "https://pub.dev"
source: hosted
version: "7.2.0"
version: "7.3.0"
glados:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -2279,7 +2279,7 @@ packages:
source: hosted
version: "3.0.7"
vector_graphics:
dependency: transitive
dependency: "direct main"
description:
name: vector_graphics
sha256: ea8d3fc7b2e0f35de38a7465063ecfcf03d8217f7962aa2a6717132cb5d43a79
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: lotti
description: Achieve your goals and keep your data private with Lotti.
publish_to: 'none'
version: 0.9.329+2027
version: 0.9.330+2032

msix_config:
display_name: LottiApp
Expand Down Expand Up @@ -138,6 +138,7 @@ dependencies:
tuple: ^2.0.0
url_launcher: ^6.1.2
uuid: ^3.0.4
vector_graphics: 1.1.5
visibility_detector: ^0.4.0+2
wechat_assets_picker: ^8.4.1
week_of_year: ^2.0.0
Expand Down

0 comments on commit 2fc6ac7

Please sign in to comment.