TF-2188 Allow editable waiting/running/canceled status
(cherry picked from commit 04af1331106afb2df676fac5fefbd2b086187a38)
This commit is contained in:
@@ -107,6 +107,10 @@ class SendingEmail with EquatableMixin {
|
|||||||
|
|
||||||
bool get isCanceled => sendingState == SendingState.canceled;
|
bool get isCanceled => sendingState == SendingState.canceled;
|
||||||
|
|
||||||
|
bool get isRunning => sendingState == SendingState.running;
|
||||||
|
|
||||||
|
bool get isEditableSupported => isWaiting || isRunning || isCanceled;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object?> get props => [
|
List<Object?> get props => [
|
||||||
sendingId,
|
sendingId,
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ class SendingQueueView extends GetWidget<SendingQueueController> with AppLoaderM
|
|||||||
onLongPressAction: controller.handleOnLongPressAction,
|
onLongPressAction: controller.handleOnLongPressAction,
|
||||||
onSelectLeadingAction: controller.toggleSelectionSendingEmail,
|
onSelectLeadingAction: controller.toggleSelectionSendingEmail,
|
||||||
onTapAction: (actionType, sendingEmail) {
|
onTapAction: (actionType, sendingEmail) {
|
||||||
if (!controller.isConnectedNetwork && sendingEmail.isWaiting) {
|
if (!controller.isConnectedNetwork && sendingEmail.isEditableSupported) {
|
||||||
controller.handleSendingEmailActionType(context, actionType, [sendingEmail]);
|
controller.handleSendingEmailActionType(context, actionType, [sendingEmail]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -104,7 +104,7 @@ class BottomBarSendingQueueWidget extends StatelessWidget {
|
|||||||
|
|
||||||
bool get _isEditable => !isConnectedNetwork &&
|
bool get _isEditable => !isConnectedNetwork &&
|
||||||
listSendingEmailSelected.length == 1 &&
|
listSendingEmailSelected.length == 1 &&
|
||||||
listSendingEmailSelected.first.isWaiting;
|
listSendingEmailSelected.first.isEditableSupported;
|
||||||
|
|
||||||
bool get _isCanResend => listSendingEmailSelected.isAllSendingStateError();
|
bool get _isCanResend => listSendingEmailSelected.isAllSendingStateError();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user