TF-2101 Add recover_deleted_messages to context_menu and trash view
(cherry picked from commit f2e96e4a7bedc0616e688976248c555bbe9605e5)
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_portal/flutter_portal.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:model/mailbox/presentation_mailbox.dart';
|
||||
import 'package:tmail_ui_user/features/base/widget/popup_item_no_icon_widget.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/composer_view_web.dart';
|
||||
import 'package:tmail_ui_user/features/email/presentation/email_view.dart';
|
||||
@@ -437,6 +438,25 @@ class MailboxDashBoardView extends BaseMailboxDashBoardView {
|
||||
);
|
||||
},
|
||||
)),
|
||||
Obx(() {
|
||||
final mailboxSelected = controller.selectedMailbox.value;
|
||||
if (mailboxSelected != null && mailboxSelected.role == PresentationMailbox.roleTrash) {
|
||||
return Row(
|
||||
children: [
|
||||
const SizedBox(width: 16),
|
||||
TMailButtonWidget.fromIcon(
|
||||
key: const Key('recover_deleted_messages_button'),
|
||||
icon: controller.imagePaths.icRecoverDeletedMessages,
|
||||
borderRadius: 10,
|
||||
iconSize: 16,
|
||||
onTapActionCallback: () => controller.gotoEmailRecovery(),
|
||||
)
|
||||
],
|
||||
);
|
||||
} else {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user