[Android][Disable work manager] Update the sending queue UI with the new way of manually resend email

(cherry picked from commit e217358ea8ef05eaeaeea0f965151682d8a6f754)
This commit is contained in:
Dat PHAM HOANG
2024-01-11 00:57:29 +07:00
committed by Dat H. Pham
parent 0283698076
commit ad4be01ea2
2 changed files with 3 additions and 19 deletions
@@ -34,16 +34,7 @@ class SendingQueueView extends GetWidget<SendingQueueController> with AppLoaderM
); );
}), }),
const Divider(color: AppColor.colorDividerComposer, height: 1), const Divider(color: AppColor.colorDividerComposer, height: 1),
if (PlatformInfo.isIOS) const BannerMessageSendingQueueWidget(),
const BannerMessageSendingQueueWidget()
else
Obx(() {
if (!controller.isConnectedNetwork) {
return const BannerMessageSendingQueueWidget();
} else {
return const SizedBox.shrink();
}
}),
Expanded(child: _buildListSendingEmails(context)), Expanded(child: _buildListSendingEmails(context)),
Obx(() { Obx(() {
if (controller.isAllUnSelected) { if (controller.isAllUnSelected) {
@@ -91,11 +82,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 (PlatformInfo.isAndroid && if (PlatformInfo.isMobile && sendingEmail.isEditableSupported) {
!controller.isConnectedNetwork &&
sendingEmail.isEditableSupported) {
controller.handleSendingEmailActionType(context, actionType, [sendingEmail]);
} else if (PlatformInfo.isIOS && sendingEmail.isEditableSupported) {
controller.handleSendingEmailActionType(context, actionType, [sendingEmail]); controller.handleSendingEmailActionType(context, actionType, [sendingEmail]);
} }
}); });
@@ -1,7 +1,6 @@
import 'package:core/presentation/extensions/color_extension.dart'; import 'package:core/presentation/extensions/color_extension.dart';
import 'package:core/presentation/resources/image_paths.dart'; import 'package:core/presentation/resources/image_paths.dart';
import 'package:core/utils/platform_info.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:tmail_ui_user/features/sending_queue/presentation/utils/sending_queue_utils.dart'; import 'package:tmail_ui_user/features/sending_queue/presentation/utils/sending_queue_utils.dart';
@@ -36,9 +35,7 @@ class BannerMessageSendingQueueWidget extends StatelessWidget {
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Expanded(child: Text( Expanded(child: Text(
PlatformInfo.isAndroid AppLocalizations.of(context).bannerMessageSendingQueueViewOnIOS,
? AppLocalizations.of(context).bannerMessageSendingQueueView
: AppLocalizations.of(context).bannerMessageSendingQueueViewOnIOS,
style: const TextStyle( style: const TextStyle(
fontSize: 15, fontSize: 15,
color: Colors.black, color: Colors.black,