feat: Separate in method: _syncLabelForOpenedEmail & add const for LabelKeywordIsNull
This commit is contained in:
@@ -87,7 +87,7 @@ mixin AddLabelToEmailMixin on EmitStateMixin {
|
|||||||
emitFailure(
|
emitFailure(
|
||||||
controller: currentController,
|
controller: currentController,
|
||||||
failure: AddALabelToAnEmailFailure(
|
failure: AddALabelToAnEmailFailure(
|
||||||
exception: LabelKeywordIsNull(),
|
exception: const LabelKeywordIsNull(),
|
||||||
labelDisplay: labelDisplay,
|
labelDisplay: labelDisplay,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -151,7 +151,7 @@ mixin AddLabelToEmailMixin on EmitStateMixin {
|
|||||||
emitFailure(
|
emitFailure(
|
||||||
controller: currentController,
|
controller: currentController,
|
||||||
failure: RemoveALabelFromAnEmailFailure(
|
failure: RemoveALabelFromAnEmailFailure(
|
||||||
exception: LabelKeywordIsNull(),
|
exception: const LabelKeywordIsNull(),
|
||||||
labelDisplay: labelDisplay,
|
labelDisplay: labelDisplay,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
+9
-1
@@ -49,6 +49,15 @@ extension HandleLogicLabelExtension on MailboxDashBoardController {
|
|||||||
_refreshLabelSettingEnabled();
|
_refreshLabelSettingEnabled();
|
||||||
|
|
||||||
if (isEmailOpened) {
|
if (isEmailOpened) {
|
||||||
|
_syncLabelForOpenedEmail(emailId, labelKeyword, shouldRemove);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _syncLabelForOpenedEmail(
|
||||||
|
EmailId emailId,
|
||||||
|
KeyWordIdentifier labelKeyword,
|
||||||
|
bool shouldRemove,
|
||||||
|
) {
|
||||||
dispatchEmailUIAction(
|
dispatchEmailUIAction(
|
||||||
SyncUpdateLabelForEmailOnMemory(
|
SyncUpdateLabelForEmailOnMemory(
|
||||||
emailId: emailId,
|
emailId: emailId,
|
||||||
@@ -57,7 +66,6 @@ extension HandleLogicLabelExtension on MailboxDashBoardController {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void _syncLabelForEmailList(
|
void _syncLabelForEmailList(
|
||||||
EmailId emailId,
|
EmailId emailId,
|
||||||
|
|||||||
Reference in New Issue
Block a user