From dd342cc560990ca3d76139ec6ee8d35b5c5c6dfa Mon Sep 17 00:00:00 2001 From: Dat PHAM HOANG Date: Mon, 26 Feb 2024 13:19:00 +0700 Subject: [PATCH 1/5] Update CHANGELOG for v0.11.3-patch4-6 (26 Feb) --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b2239ff6b..64aa22ddae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [0.11.3-patch4-6] - 2024-02-26 +### Fixed +- #2326 Display total count of Draft +- #2362 Auto load more in big screen +- #2465 Fix wrong time format in Blue bar +- #2633 Fix blink blink in composer [Web] +- #2599 Resolve notification flood in Android + ## [0.11.3-patch4-5] - 2024-02-21 ### Fixed - #2611 Get only one by one in FULL level when receive changes in notification From ab076ab6aea33458b9b7e654c203262b192c25d6 Mon Sep 17 00:00:00 2001 From: Dat PHAM HOANG Date: Tue, 27 Feb 2024 11:54:19 +0700 Subject: [PATCH 2/5] TF-2638 create mixin for getOptionParam --- core/lib/core.dart | 1 + core/lib/utils/option_param_mixin.dart | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 core/lib/utils/option_param_mixin.dart diff --git a/core/lib/core.dart b/core/lib/core.dart index ec9be0be44..eb665bf645 100644 --- a/core/lib/core.dart +++ b/core/lib/core.dart @@ -42,6 +42,7 @@ export 'utils/config/app_config_parser.dart'; export 'utils/config/errors.dart'; export 'data/utils/compress_file_utils.dart'; export 'utils/platform_info.dart'; +export 'utils/option_param_mixin.dart'; // Views export 'presentation/views/text/slogan_builder.dart'; diff --git a/core/lib/utils/option_param_mixin.dart b/core/lib/utils/option_param_mixin.dart new file mode 100644 index 0000000000..f5e25737ad --- /dev/null +++ b/core/lib/utils/option_param_mixin.dart @@ -0,0 +1,11 @@ +import 'package:dartz/dartz.dart'; + +mixin OptionParamMixin { + T? getOptionParam(Option? option, T? defaultValue) { + if (option != null) { + return option.toNullable(); + } else { + return defaultValue; + } + } +} \ No newline at end of file From bc7b592d3b16598a13595e4491b8e00bb72998b6 Mon Sep 17 00:00:00 2001 From: Dat PHAM HOANG Date: Tue, 27 Feb 2024 11:56:00 +0700 Subject: [PATCH 3/5] TF-2638 Update dartSDK for vacation --- contact/pubspec.lock | 4 ++-- email_recovery/pubspec.lock | 4 ++-- fcm/pubspec.lock | 4 ++-- forward/pubspec.lock | 4 ++-- model/pubspec.lock | 4 ++-- pubspec.lock | 4 ++-- rule_filter/pubspec.lock | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/contact/pubspec.lock b/contact/pubspec.lock index 52ee8479f3..1e8ce88765 100644 --- a/contact/pubspec.lock +++ b/contact/pubspec.lock @@ -531,8 +531,8 @@ packages: dependency: "direct main" description: path: "." - ref: master - resolved-ref: a1b79695b844888ec8330d41964d1a054c348bc2 + ref: cnb_support + resolved-ref: "351a1bf0fef48f59d771d3a485cbada950f2ed0a" url: "https://github.com/linagora/jmap-dart-client.git" source: git version: "0.0.1" diff --git a/email_recovery/pubspec.lock b/email_recovery/pubspec.lock index 7fd30014fb..d02d1799a0 100644 --- a/email_recovery/pubspec.lock +++ b/email_recovery/pubspec.lock @@ -295,8 +295,8 @@ packages: dependency: "direct main" description: path: "." - ref: master - resolved-ref: a1b79695b844888ec8330d41964d1a054c348bc2 + ref: cnb_support + resolved-ref: "351a1bf0fef48f59d771d3a485cbada950f2ed0a" url: "https://github.com/linagora/jmap-dart-client.git" source: git version: "0.0.1" diff --git a/fcm/pubspec.lock b/fcm/pubspec.lock index 0868701047..ed5249f404 100644 --- a/fcm/pubspec.lock +++ b/fcm/pubspec.lock @@ -295,8 +295,8 @@ packages: dependency: "direct main" description: path: "." - ref: master - resolved-ref: a1b79695b844888ec8330d41964d1a054c348bc2 + ref: cnb_support + resolved-ref: "351a1bf0fef48f59d771d3a485cbada950f2ed0a" url: "https://github.com/linagora/jmap-dart-client.git" source: git version: "0.0.1" diff --git a/forward/pubspec.lock b/forward/pubspec.lock index 0868701047..ed5249f404 100644 --- a/forward/pubspec.lock +++ b/forward/pubspec.lock @@ -295,8 +295,8 @@ packages: dependency: "direct main" description: path: "." - ref: master - resolved-ref: a1b79695b844888ec8330d41964d1a054c348bc2 + ref: cnb_support + resolved-ref: "351a1bf0fef48f59d771d3a485cbada950f2ed0a" url: "https://github.com/linagora/jmap-dart-client.git" source: git version: "0.0.1" diff --git a/model/pubspec.lock b/model/pubspec.lock index 7a4a62d982..4c6ecb5f07 100644 --- a/model/pubspec.lock +++ b/model/pubspec.lock @@ -523,8 +523,8 @@ packages: dependency: "direct main" description: path: "." - ref: master - resolved-ref: a1b79695b844888ec8330d41964d1a054c348bc2 + ref: cnb_support + resolved-ref: "351a1bf0fef48f59d771d3a485cbada950f2ed0a" url: "https://github.com/linagora/jmap-dart-client.git" source: git version: "0.0.1" diff --git a/pubspec.lock b/pubspec.lock index 10776dc42a..05a9e62e25 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1114,8 +1114,8 @@ packages: dependency: "direct main" description: path: "." - ref: master - resolved-ref: a1b79695b844888ec8330d41964d1a054c348bc2 + ref: cnb_support + resolved-ref: "351a1bf0fef48f59d771d3a485cbada950f2ed0a" url: "https://github.com/linagora/jmap-dart-client.git" source: git version: "0.0.1" diff --git a/rule_filter/pubspec.lock b/rule_filter/pubspec.lock index 0868701047..ed5249f404 100644 --- a/rule_filter/pubspec.lock +++ b/rule_filter/pubspec.lock @@ -295,8 +295,8 @@ packages: dependency: "direct main" description: path: "." - ref: master - resolved-ref: a1b79695b844888ec8330d41964d1a054c348bc2 + ref: cnb_support + resolved-ref: "351a1bf0fef48f59d771d3a485cbada950f2ed0a" url: "https://github.com/linagora/jmap-dart-client.git" source: git version: "0.0.1" From fd318aa4f62627862ecaae78b63f037bb155b346 Mon Sep 17 00:00:00 2001 From: Dat PHAM HOANG Date: Tue, 27 Feb 2024 11:56:43 +0700 Subject: [PATCH 4/5] TF-2638 Change logic of storing value for VacationPresentation --- .../model/vacation/vacation_presentation.dart | 34 ++++++++------- .../vacation/vacation_controller.dart | 42 ++++++++++--------- 2 files changed, 40 insertions(+), 36 deletions(-) diff --git a/lib/features/manage_account/presentation/model/vacation/vacation_presentation.dart b/lib/features/manage_account/presentation/model/vacation/vacation_presentation.dart index 75a66bac11..9d0b94800f 100644 --- a/lib/features/manage_account/presentation/model/vacation/vacation_presentation.dart +++ b/lib/features/manage_account/presentation/model/vacation/vacation_presentation.dart @@ -1,4 +1,6 @@ +import 'package:core/core.dart'; +import 'package:dartz/dartz.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter/material.dart'; import 'package:jmap_dart_client/jmap/core/utc_date.dart'; @@ -6,7 +8,7 @@ import 'package:jmap_dart_client/jmap/mail/vacation/vacation_response.dart'; import 'package:tmail_ui_user/features/manage_account/presentation/extensions/datetime_extension.dart'; import 'package:tmail_ui_user/features/manage_account/presentation/model/vacation/vacation_responder_status.dart'; -class VacationPresentation with EquatableMixin { +class VacationPresentation with EquatableMixin, OptionParamMixin { final VacationResponderStatus status; final DateTime? startDate; final TimeOfDay? startTime; @@ -33,26 +35,26 @@ class VacationPresentation with EquatableMixin { return VacationPresentation(); } - VacationPresentation copyWidth({ + VacationPresentation copyWith({ VacationResponderStatus? status, - DateTime? startDate, - TimeOfDay? startTime, - DateTime? endDate, - TimeOfDay? endTime, - String? messagePlainText, - String? messageHtmlText, - String? subject, + Option? startDateOption, + Option? startTimeOption, + Option? endDateOption, + Option? endTimeOption, + Option? messagePlainTextOption, + Option? messageHtmlTextOption, + Option? subjectOption, bool? vacationStopEnabled, }) { return VacationPresentation( status: status ?? this.status, - startDate: startDate ?? this.startDate, - startTime: startTime ?? this.startTime, - endDate: endDate ?? this.endDate, - endTime: endTime ?? this.endTime, - messagePlainText: messagePlainText ?? this.messagePlainText, - messageHtmlText: messageHtmlText ?? this.messageHtmlText, - subject: subject ?? this.subject, + startDate: getOptionParam(startDateOption, startDate), + startTime: getOptionParam(startTimeOption, startTime), + endDate: getOptionParam(endDateOption, endDate), + endTime: getOptionParam(endTimeOption, endTime), + messagePlainText: getOptionParam(messagePlainTextOption, messagePlainText), + messageHtmlText: getOptionParam(messageHtmlTextOption, messageHtmlText), + subject: getOptionParam(subjectOption, subject), vacationStopEnabled: vacationStopEnabled ?? this.vacationStopEnabled ); } diff --git a/lib/features/manage_account/presentation/vacation/vacation_controller.dart b/lib/features/manage_account/presentation/vacation/vacation_controller.dart index 7067f8b140..3c53e14267 100644 --- a/lib/features/manage_account/presentation/vacation/vacation_controller.dart +++ b/lib/features/manage_account/presentation/vacation/vacation_controller.dart @@ -1,4 +1,5 @@ import 'package:core/core.dart'; +import 'package:dartz/dartz.dart'; import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:jmap_dart_client/jmap/mail/vacation/vacation_response.dart'; @@ -129,24 +130,25 @@ class VacationController extends BaseController { void updateVacationPresentation({ VacationResponderStatus? newStatus, - DateTime? startDate, - TimeOfDay? startTime, - DateTime? endDate, - TimeOfDay? endTime, + Option? startDateOption, + Option? startTimeOption, + Option? endDateOption, + Option? endTimeOption, bool? vacationStopEnabled, - String? messagePlainText, - String? messageHtmlText, + Option? messagePlainTextOption, + Option? messageHtmlTextOption, }) { final currentVacation = vacationPresentation.value; - final newVacation = currentVacation.copyWidth( + final stopEnabled = vacationStopEnabled ?? currentVacation.vacationStopEnabled; + final newVacation = currentVacation.copyWith( status: newStatus, - startDate: startDate, - startTime: startTime, - endDate: endDate, - endTime: endTime, + startDateOption: startDateOption, + startTimeOption: startTimeOption, + endDateOption: stopEnabled ? endDateOption : const None(), + endTimeOption: stopEnabled ? endTimeOption : const None(), vacationStopEnabled: vacationStopEnabled, - messagePlainText: messagePlainText, - messageHtmlText: messageHtmlText + messagePlainTextOption: messagePlainTextOption, + messageHtmlTextOption: messageHtmlTextOption ); log('VacationController::updateVacationPresentation():newVacation: $newVacation'); vacationPresentation.value = newVacation; @@ -187,9 +189,9 @@ class VacationController extends BaseController { } if (dateType == DateType.start) { - updateVacationPresentation(startDate: datePicked); + updateVacationPresentation(startDateOption: Some(datePicked)); } else { - updateVacationPresentation(endDate: datePicked); + updateVacationPresentation(endDateOption: Some(datePicked)); } } @@ -221,9 +223,9 @@ class VacationController extends BaseController { } if (dateType == DateType.start) { - updateVacationPresentation(startTime: timePicked); + updateVacationPresentation(startTimeOption: Some(timePicked)); } else { - updateVacationPresentation(endTime: timePicked); + updateVacationPresentation(endTimeOption: Some(timePicked)); } } @@ -281,9 +283,9 @@ class VacationController extends BaseController { final subjectVacation = subjectTextController.text; - final newVacationPresentation = vacationPresentation.value.copyWidth( - messageHtmlText: messageHtmlText, - subject: subjectVacation + final newVacationPresentation = vacationPresentation.value.copyWith( + messageHtmlTextOption: Some(messageHtmlText), + subjectOption: Some(subjectVacation) ); log('VacationController::saveVacation(): newVacationPresentation: $newVacationPresentation'); final newVacationResponse = newVacationPresentation.toVacationResponse(); From d5de25abad1556f6166a33c9cd0213c1e96830ff Mon Sep 17 00:00:00 2001 From: Dat PHAM HOANG Date: Tue, 27 Feb 2024 14:21:48 +0700 Subject: [PATCH 5/5] Apply OptionParamMixin for SearchEmailFilter --- contact/pubspec.yaml | 2 +- email_recovery/pubspec.yaml | 2 +- fcm/pubspec.yaml | 2 +- forward/pubspec.yaml | 2 +- .../model/search/search_email_filter.dart | 27 +++++++------------ model/pubspec.yaml | 2 +- pubspec.yaml | 2 +- rule_filter/pubspec.yaml | 2 +- 8 files changed, 17 insertions(+), 24 deletions(-) diff --git a/contact/pubspec.yaml b/contact/pubspec.yaml index 97466ee95c..62d0f3c70f 100644 --- a/contact/pubspec.yaml +++ b/contact/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: jmap_dart_client: git: url: https://github.com/linagora/jmap-dart-client.git - ref: master + ref: cnb_support ### Dependencies from pub.dev ### equatable: 2.0.5 diff --git a/email_recovery/pubspec.yaml b/email_recovery/pubspec.yaml index 1cb39b9c3c..08d4375edf 100644 --- a/email_recovery/pubspec.yaml +++ b/email_recovery/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: jmap_dart_client: git: url: https://github.com/linagora/jmap-dart-client.git - ref: master + ref: cnb_support ### Dependencies from pub.dev ### equatable: 2.0.5 diff --git a/fcm/pubspec.yaml b/fcm/pubspec.yaml index fc1464a52a..0a6244b89b 100644 --- a/fcm/pubspec.yaml +++ b/fcm/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: jmap_dart_client: git: url: https://github.com/linagora/jmap-dart-client.git - ref: master + ref: cnb_support ### Dependencies from pub.dev ### equatable: 2.0.5 diff --git a/forward/pubspec.yaml b/forward/pubspec.yaml index 94181ea0ca..decaa8b942 100644 --- a/forward/pubspec.yaml +++ b/forward/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: jmap_dart_client: git: url: https://github.com/linagora/jmap-dart-client.git - ref: master + ref: cnb_support ### Dependencies from pub.dev ### equatable: 2.0.5 diff --git a/lib/features/mailbox_dashboard/presentation/model/search/search_email_filter.dart b/lib/features/mailbox_dashboard/presentation/model/search/search_email_filter.dart index 3103fc904f..2daa71341e 100644 --- a/lib/features/mailbox_dashboard/presentation/model/search/search_email_filter.dart +++ b/lib/features/mailbox_dashboard/presentation/model/search/search_email_filter.dart @@ -1,3 +1,4 @@ +import 'package:core/core.dart'; import 'package:dartz/dartz.dart'; import 'package:equatable/equatable.dart'; import 'package:jmap_dart_client/jmap/core/filter/filter.dart'; @@ -13,7 +14,7 @@ import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/model/sear import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/model/search/email_sort_order_type.dart'; import 'package:tmail_ui_user/features/thread/domain/model/search_query.dart'; -class SearchEmailFilter with EquatableMixin { +class SearchEmailFilter with EquatableMixin, OptionParamMixin { final Set from; final Set to; final SearchQuery? text; @@ -69,30 +70,22 @@ class SearchEmailFilter with EquatableMixin { Option? positionOption, }) { return SearchEmailFilter( - from: _getOptionParam(fromOption, from), - to: _getOptionParam(toOption, to), + from: getOptionParam(fromOption, from), + to: getOptionParam(toOption, to), text: text ?? this.text, - subject: _getOptionParam(subjectOption, subject), + subject: getOptionParam(subjectOption, subject), notKeyword: notKeyword ?? this.notKeyword, mailbox: mailbox ?? this.mailbox, emailReceiveTimeType: emailReceiveTimeType ?? this.emailReceiveTimeType, hasAttachment: hasAttachment ?? this.hasAttachment, - before: _getOptionParam(beforeOption, before), - startDate: _getOptionParam(startDateOption, startDate), - endDate: _getOptionParam(endDateOption, endDate), - sortOrder: _getOptionParam(sortOrderOption, sortOrder), - position: _getOptionParam(positionOption, position), + before: getOptionParam(beforeOption, before), + startDate: getOptionParam(startDateOption, startDate), + endDate: getOptionParam(endDateOption, endDate), + sortOrder: getOptionParam(sortOrderOption, sortOrder), + position: getOptionParam(positionOption, position), ); } - T? _getOptionParam(Option? option, T? defaultValue) { - if (option != null) { - return option.toNullable(); - } else { - return defaultValue; - } - } - Filter? mappingToEmailFilterCondition({ required EmailSortOrderType sortOrderType, EmailFilterCondition? moreFilterCondition diff --git a/model/pubspec.yaml b/model/pubspec.yaml index a37203b6ca..6255b55049 100644 --- a/model/pubspec.yaml +++ b/model/pubspec.yaml @@ -33,7 +33,7 @@ dependencies: jmap_dart_client: git: url: https://github.com/linagora/jmap-dart-client.git - ref: master + ref: cnb_support ### Dependencies from pub.dev ### cupertino_icons: 1.0.6 diff --git a/pubspec.yaml b/pubspec.yaml index 411bc0d21b..8e0f14ef2c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -62,7 +62,7 @@ dependencies: jmap_dart_client: git: url: https://github.com/linagora/jmap-dart-client.git - ref: master + ref: cnb_support contacts_service: git: diff --git a/rule_filter/pubspec.yaml b/rule_filter/pubspec.yaml index 3406395aad..8954d4a2b8 100644 --- a/rule_filter/pubspec.yaml +++ b/rule_filter/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: jmap_dart_client: git: url: https://github.com/linagora/jmap-dart-client.git - ref: master + ref: cnb_support ### Dependencies from pub.dev ### equatable: 2.0.5