Skip to content

Commit

Permalink
TF-3316 Fix inconsistent vacation message
Browse files Browse the repository at this point in the history
  • Loading branch information
tddang-linagora committed Dec 11, 2024
1 parent b240937 commit 0fefb12
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 33 deletions.
4 changes: 2 additions & 2 deletions contact/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: main
resolved-ref: bb4ffba9e3aba2cbb60c1173663abf975b521199
ref: "bugfix/allow-vacation-response-textbody-null"
resolved-ref: "8da70e459a1b5b8dc7a84b1b84d3bd1400247aee"
url: "https://github.com/linagora/jmap-dart-client.git"
source: git
version: "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion contact/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
jmap_dart_client:
git:
url: https://github.com/linagora/jmap-dart-client.git
ref: main
ref: bugfix/allow-vacation-response-textbody-null

### Dependencies from pub.dev ###
equatable: 2.0.5
Expand Down
4 changes: 2 additions & 2 deletions email_recovery/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: main
resolved-ref: bb4ffba9e3aba2cbb60c1173663abf975b521199
ref: "bugfix/allow-vacation-response-textbody-null"
resolved-ref: "8da70e459a1b5b8dc7a84b1b84d3bd1400247aee"
url: "https://github.com/linagora/jmap-dart-client.git"
source: git
version: "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion email_recovery/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
jmap_dart_client:
git:
url: https://github.com/linagora/jmap-dart-client.git
ref: main
ref: bugfix/allow-vacation-response-textbody-null

### Dependencies from pub.dev ###
equatable: 2.0.5
Expand Down
4 changes: 2 additions & 2 deletions fcm/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: main
resolved-ref: bb4ffba9e3aba2cbb60c1173663abf975b521199
ref: "bugfix/allow-vacation-response-textbody-null"
resolved-ref: "8da70e459a1b5b8dc7a84b1b84d3bd1400247aee"
url: "https://github.com/linagora/jmap-dart-client.git"
source: git
version: "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion fcm/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
jmap_dart_client:
git:
url: https://github.com/linagora/jmap-dart-client.git
ref: main
ref: bugfix/allow-vacation-response-textbody-null

### Dependencies from pub.dev ###
equatable: 2.0.5
Expand Down
4 changes: 2 additions & 2 deletions forward/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: main
resolved-ref: bb4ffba9e3aba2cbb60c1173663abf975b521199
ref: "bugfix/allow-vacation-response-textbody-null"
resolved-ref: "8da70e459a1b5b8dc7a84b1b84d3bd1400247aee"
url: "https://github.com/linagora/jmap-dart-client.git"
source: git
version: "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion forward/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
jmap_dart_client:
git:
url: https://github.com/linagora/jmap-dart-client.git
ref: main
ref: bugfix/allow-vacation-response-textbody-null

### Dependencies from pub.dev ###
equatable: 2.0.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ extension VacationResponseExtension on VacationResponse {
endTime: toDate?.value != null
? TimeOfDay.fromDateTime(toDate!.value.toLocal())
: null,
messagePlainText: textBody,
messageHtmlText: htmlBody,
subject: subject,
vacationStopEnabled: toDate != null
Expand Down Expand Up @@ -78,15 +77,13 @@ extension VacationResponseExtension on VacationResponse {
UTCDate? fromDate,
UTCDate? toDate,
String? subject,
String? textBody,
String? htmlBody
}) {
return VacationResponse(
isEnabled: isEnabled ?? this.isEnabled,
fromDate: fromDate ?? this.fromDate,
toDate: toDate ?? this.toDate,
subject: subject ?? this.subject,
textBody: textBody ?? this.textBody,
htmlBody: htmlBody ?? this.htmlBody
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class VacationPresentation with EquatableMixin, OptionParamMixin {
final TimeOfDay? startTime;
final DateTime? endDate;
final TimeOfDay? endTime;
final String? messagePlainText;
final String? messageHtmlText;
final String? subject;
final bool vacationStopEnabled;
Expand All @@ -25,7 +24,6 @@ class VacationPresentation with EquatableMixin, OptionParamMixin {
this.startTime,
this.endDate,
this.endTime,
this.messagePlainText,
this.messageHtmlText,
this.subject,
this.vacationStopEnabled = false,
Expand All @@ -52,7 +50,6 @@ class VacationPresentation with EquatableMixin, OptionParamMixin {
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
Expand Down Expand Up @@ -81,7 +78,6 @@ class VacationPresentation with EquatableMixin, OptionParamMixin {
endDate,
endTime,
vacationStopEnabled,
messagePlainText,
messageHtmlText,
subject,
];
Expand All @@ -93,7 +89,6 @@ extension VacationPresentationExtension on VacationPresentation {
isEnabled: isEnabled,
fromDate: fromDate != null ? UTCDate(fromDate!.toUtc()) : null,
toDate: toDate != null ? UTCDate(toDate!.toUtc()) : null,
textBody: messagePlainText,
htmlBody: messageHtmlText,
subject: subject,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class VacationController extends BaseController {
void _initializeValueForVacation(VacationPresentation newVacation) {
vacationPresentation.value = newVacation;
subjectTextController.text = newVacation.subject ?? '';
updateMessageHtmlText(newVacation.messageHtmlText ?? newVacation.messagePlainText ?? '');
updateMessageHtmlText(newVacation.messageHtmlText ?? '');
if (PlatformInfo.isWeb) {
_richTextControllerForWeb.editorController.setText(newVacation.messageHtmlText ?? '');
} else {
Expand Down
4 changes: 2 additions & 2 deletions model/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: main
resolved-ref: bb4ffba9e3aba2cbb60c1173663abf975b521199
ref: "bugfix/allow-vacation-response-textbody-null"
resolved-ref: "8da70e459a1b5b8dc7a84b1b84d3bd1400247aee"
url: "https://github.com/linagora/jmap-dart-client.git"
source: git
version: "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion model/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies:
jmap_dart_client:
git:
url: https://github.com/linagora/jmap-dart-client.git
ref: main
ref: bugfix/allow-vacation-response-textbody-null

### Dependencies from pub.dev ###
cupertino_icons: 1.0.6
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1315,8 +1315,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: main
resolved-ref: bb4ffba9e3aba2cbb60c1173663abf975b521199
ref: "bugfix/allow-vacation-response-textbody-null"
resolved-ref: "8da70e459a1b5b8dc7a84b1b84d3bd1400247aee"
url: "https://github.com/linagora/jmap-dart-client.git"
source: git
version: "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ dependencies:
jmap_dart_client:
git:
url: https://github.com/linagora/jmap-dart-client.git
ref: main
ref: bugfix/allow-vacation-response-textbody-null

contacts_service:
git:
Expand Down
4 changes: 2 additions & 2 deletions rule_filter/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: main
resolved-ref: bb4ffba9e3aba2cbb60c1173663abf975b521199
ref: "bugfix/allow-vacation-response-textbody-null"
resolved-ref: "8da70e459a1b5b8dc7a84b1b84d3bd1400247aee"
url: "https://github.com/linagora/jmap-dart-client.git"
source: git
version: "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion rule_filter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
jmap_dart_client:
git:
url: https://github.com/linagora/jmap-dart-client.git
ref: main
ref: bugfix/allow-vacation-response-textbody-null

### Dependencies from pub.dev ###
equatable: 2.0.5
Expand Down
4 changes: 2 additions & 2 deletions server_settings/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ packages:
dependency: "direct main"
description:
path: "."
ref: main
resolved-ref: bb4ffba9e3aba2cbb60c1173663abf975b521199
ref: "bugfix/allow-vacation-response-textbody-null"
resolved-ref: "1702db4bc855e7e66c6e1d6b1f2cd0d09c4f1149"
url: "https://github.com/linagora/jmap-dart-client.git"
source: git
version: "0.3.0"
Expand Down
2 changes: 1 addition & 1 deletion server_settings/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
jmap_dart_client:
git:
url: https://github.com/linagora/jmap-dart-client.git
ref: main
ref: bugfix/allow-vacation-response-textbody-null

### Dependencies from pub.dev ###
equatable: 2.0.5
Expand Down

0 comments on commit 0fefb12

Please sign in to comment.