TF-467 Apply new UI for mailbox of destination picker and mailbox creator
This commit is contained in:
@@ -45,6 +45,10 @@ class ResponsiveUtils {
|
|||||||
|
|
||||||
bool isLandscape(BuildContext context) => context.orientation == Orientation.landscape;
|
bool isLandscape(BuildContext context) => context.orientation == Orientation.landscape;
|
||||||
|
|
||||||
|
bool isLandscapeMobile(BuildContext context) => isMobile(context) && isLandscape(context);
|
||||||
|
|
||||||
|
bool isPortraitMobile(BuildContext context) => isMobile(context) && isPortrait(context);
|
||||||
|
|
||||||
double getWidthLoginTextField(BuildContext context) => isMobile(context) ? _loginTextFieldWidthSmallScreen : _loginTextFieldWidthLargeScreen;
|
double getWidthLoginTextField(BuildContext context) => isMobile(context) ? _loginTextFieldWidthSmallScreen : _loginTextFieldWidthLargeScreen;
|
||||||
|
|
||||||
double getWidthLoginButton() => _loginButtonWidth;
|
double getWidthLoginButton() => _loginButtonWidth;
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||||
import 'package:model/mailbox/expand_mode.dart';
|
import 'package:model/model.dart';
|
||||||
import 'package:model/mailbox/presentation_mailbox.dart';
|
|
||||||
import 'package:model/mailbox/select_mode.dart';
|
|
||||||
import 'package:tmail_ui_user/features/base/base_controller.dart';
|
import 'package:tmail_ui_user/features/base/base_controller.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_node.dart';
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_node.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_tree.dart';
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_tree.dart';
|
||||||
@@ -17,13 +15,17 @@ abstract class BaseMailboxController extends BaseController {
|
|||||||
final folderMailboxTree = MailboxTree(MailboxNode.root()).obs;
|
final folderMailboxTree = MailboxTree(MailboxNode.root()).obs;
|
||||||
final defaultMailboxTree = MailboxTree(MailboxNode.root()).obs;
|
final defaultMailboxTree = MailboxTree(MailboxNode.root()).obs;
|
||||||
|
|
||||||
|
List<PresentationMailbox> allMailboxes = <PresentationMailbox>[];
|
||||||
|
|
||||||
Future buildTree(List<PresentationMailbox> allMailbox) async {
|
Future buildTree(List<PresentationMailbox> allMailbox) async {
|
||||||
|
this.allMailboxes = allMailbox;
|
||||||
final tupleTree = await _treeBuilder.generateMailboxTreeInUI(allMailbox);
|
final tupleTree = await _treeBuilder.generateMailboxTreeInUI(allMailbox);
|
||||||
defaultMailboxTree.value = tupleTree.value1;
|
defaultMailboxTree.value = tupleTree.value1;
|
||||||
folderMailboxTree.value = tupleTree.value2;
|
folderMailboxTree.value = tupleTree.value2;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future refreshTree(List<PresentationMailbox> allMailbox) async {
|
Future refreshTree(List<PresentationMailbox> allMailbox) async {
|
||||||
|
this.allMailboxes = allMailbox;
|
||||||
final tupleTree = await _treeBuilder.generateMailboxTreeInUIAfterRefreshChanges(
|
final tupleTree = await _treeBuilder.generateMailboxTreeInUIAfterRefreshChanges(
|
||||||
allMailbox, defaultMailboxTree.value, folderMailboxTree.value);
|
allMailbox, defaultMailboxTree.value, folderMailboxTree.value);
|
||||||
defaultMailboxTree.firstRebuild = true;
|
defaultMailboxTree.firstRebuild = true;
|
||||||
@@ -84,4 +86,19 @@ abstract class BaseMailboxController extends BaseController {
|
|||||||
final mailboxNode = defaultMailboxTree.value.findNode((node) => node.item.role == role);
|
final mailboxNode = defaultMailboxTree.value.findNode((node) => node.item.role == role);
|
||||||
return mailboxNode;
|
return mailboxNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<PresentationMailbox> findMailboxPath(List<PresentationMailbox> mailboxes) {
|
||||||
|
return mailboxes.map((presentationMailbox) {
|
||||||
|
if (!presentationMailbox.hasParentId()) {
|
||||||
|
return presentationMailbox;
|
||||||
|
} else {
|
||||||
|
final mailboxNodePath = findNodePath(presentationMailbox.id);
|
||||||
|
if (mailboxNodePath != null) {
|
||||||
|
return presentationMailbox.toPresentationMailboxWithMailboxPath(mailboxNodePath);
|
||||||
|
} else {
|
||||||
|
return presentationMailbox;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).toList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import 'package:tmail_ui_user/features/mailbox/data/local/mailbox_cache_manager.
|
|||||||
import 'package:tmail_ui_user/features/mailbox/data/repository/mailbox_repository_impl.dart';
|
import 'package:tmail_ui_user/features/mailbox/data/repository/mailbox_repository_impl.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/domain/repository/mailbox_repository.dart';
|
import 'package:tmail_ui_user/features/mailbox/domain/repository/mailbox_repository.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/domain/usecases/get_all_mailbox_interactor.dart';
|
import 'package:tmail_ui_user/features/mailbox/domain/usecases/get_all_mailbox_interactor.dart';
|
||||||
|
import 'package:tmail_ui_user/features/mailbox/domain/usecases/search_mailbox_interactor.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_tree_builder.dart';
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_tree_builder.dart';
|
||||||
|
|
||||||
class DestinationPickerBindings extends BaseBindings {
|
class DestinationPickerBindings extends BaseBindings {
|
||||||
@@ -31,6 +32,7 @@ class DestinationPickerBindings extends BaseBindings {
|
|||||||
void bindingsController() {
|
void bindingsController() {
|
||||||
Get.lazyPut(() => DestinationPickerController(
|
Get.lazyPut(() => DestinationPickerController(
|
||||||
Get.find<GetAllMailboxInteractor>(),
|
Get.find<GetAllMailboxInteractor>(),
|
||||||
|
Get.find<SearchMailboxInteractor>(),
|
||||||
Get.find<TreeBuilder>(),
|
Get.find<TreeBuilder>(),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
@@ -51,6 +53,7 @@ class DestinationPickerBindings extends BaseBindings {
|
|||||||
@override
|
@override
|
||||||
void bindingsInteractor() {
|
void bindingsInteractor() {
|
||||||
Get.lazyPut(() => GetAllMailboxInteractor(Get.find<MailboxRepository>()));
|
Get.lazyPut(() => GetAllMailboxInteractor(Get.find<MailboxRepository>()));
|
||||||
|
Get.lazyPut(() => SearchMailboxInteractor());
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -1,25 +1,42 @@
|
|||||||
|
|
||||||
import 'package:core/core.dart';
|
import 'package:core/core.dart';
|
||||||
import 'package:dartz/dartz.dart';
|
import 'package:dartz/dartz.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:jmap_dart_client/jmap/account_id.dart';
|
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||||
import 'package:model/model.dart';
|
import 'package:model/model.dart';
|
||||||
import 'package:tmail_ui_user/features/base/base_mailbox_controller.dart';
|
import 'package:tmail_ui_user/features/base/base_mailbox_controller.dart';
|
||||||
import 'package:tmail_ui_user/features/destination_picker/presentation/model/destination_picker_arguments.dart';
|
import 'package:tmail_ui_user/features/destination_picker/presentation/model/destination_picker_arguments.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/domain/state/get_all_mailboxes_state.dart';
|
import 'package:tmail_ui_user/features/mailbox/domain/state/get_all_mailboxes_state.dart';
|
||||||
|
import 'package:tmail_ui_user/features/mailbox/domain/state/search_mailbox_state.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/domain/usecases/get_all_mailbox_interactor.dart';
|
import 'package:tmail_ui_user/features/mailbox/domain/usecases/get_all_mailbox_interactor.dart';
|
||||||
|
import 'package:tmail_ui_user/features/mailbox/domain/usecases/search_mailbox_interactor.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_actions.dart';
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_actions.dart';
|
||||||
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_categories.dart';
|
||||||
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_categories_expand_mode.dart';
|
||||||
|
import 'package:tmail_ui_user/features/thread/domain/model/search_query.dart';
|
||||||
|
import 'package:tmail_ui_user/features/thread/presentation/model/search_state.dart';
|
||||||
|
import 'package:tmail_ui_user/features/thread/presentation/model/search_status.dart';
|
||||||
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
|
import 'package:tmail_ui_user/main/routes/route_navigation.dart';
|
||||||
|
|
||||||
class DestinationPickerController extends BaseMailboxController {
|
class DestinationPickerController extends BaseMailboxController {
|
||||||
|
|
||||||
final GetAllMailboxInteractor _getAllMailboxInteractor;
|
final GetAllMailboxInteractor _getAllMailboxInteractor;
|
||||||
|
final SearchMailboxInteractor _searchMailboxInteractor;
|
||||||
|
|
||||||
final mailboxAction = Rxn<MailboxActions>();
|
final mailboxAction = Rxn<MailboxActions>();
|
||||||
|
final listMailboxSearched = <PresentationMailbox>[].obs;
|
||||||
|
final searchState = SearchState.initial().obs;
|
||||||
|
final searchQuery = SearchQuery.initial().obs;
|
||||||
|
final mailboxCategoriesExpandMode = MailboxCategoriesExpandMode.initial().obs;
|
||||||
|
|
||||||
AccountId? accountId;
|
AccountId? accountId;
|
||||||
|
final searchInputController = TextEditingController();
|
||||||
|
final searchFocus = FocusNode();
|
||||||
|
|
||||||
DestinationPickerController(
|
DestinationPickerController(
|
||||||
this._getAllMailboxInteractor,
|
this._getAllMailboxInteractor,
|
||||||
|
this._searchMailboxInteractor,
|
||||||
treeBuilder,
|
treeBuilder,
|
||||||
) : super(treeBuilder);
|
) : super(treeBuilder);
|
||||||
|
|
||||||
@@ -46,17 +63,93 @@ class DestinationPickerController extends BaseMailboxController {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void onDone() {
|
void onDone() {
|
||||||
|
viewState.value.fold(
|
||||||
|
(failure) {
|
||||||
|
if (failure is SearchMailboxFailure) {
|
||||||
|
_searchMailboxFailure(failure);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
(success) {
|
||||||
|
if (success is SearchMailboxSuccess) {
|
||||||
|
_searchMailboxSuccess(success);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onError(error) {}
|
void onError(error) {}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
searchInputController.dispose();
|
||||||
|
searchFocus.dispose();
|
||||||
|
super.onClose();
|
||||||
|
}
|
||||||
|
|
||||||
void getAllMailboxAction() {
|
void getAllMailboxAction() {
|
||||||
if (accountId != null) {
|
if (accountId != null) {
|
||||||
consumeState(_getAllMailboxInteractor.execute(accountId!));
|
consumeState(_getAllMailboxInteractor.execute(accountId!));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void toggleMailboxCategories(MailboxCategories categories) {
|
||||||
|
switch(categories) {
|
||||||
|
case MailboxCategories.exchange:
|
||||||
|
final newExpandMode = mailboxCategoriesExpandMode.value.defaultMailbox == ExpandMode.EXPAND ? ExpandMode.COLLAPSE : ExpandMode.EXPAND;
|
||||||
|
mailboxCategoriesExpandMode.value.defaultMailbox = newExpandMode;
|
||||||
|
mailboxCategoriesExpandMode.refresh();
|
||||||
|
break;
|
||||||
|
case MailboxCategories.folders:
|
||||||
|
final newExpandMode = mailboxCategoriesExpandMode.value.folderMailbox == ExpandMode.EXPAND ? ExpandMode.COLLAPSE : ExpandMode.EXPAND;
|
||||||
|
mailboxCategoriesExpandMode.value.folderMailbox = newExpandMode;
|
||||||
|
mailboxCategoriesExpandMode.refresh();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isSearchActive() => searchState.value.searchStatus == SearchStatus.ACTIVE;
|
||||||
|
|
||||||
|
void enableSearch() {
|
||||||
|
searchState.value = searchState.value.enableSearchState();
|
||||||
|
}
|
||||||
|
|
||||||
|
void disableSearch(BuildContext context) {
|
||||||
|
listMailboxSearched.clear();
|
||||||
|
searchState.value = searchState.value.disableSearchState();
|
||||||
|
searchQuery.value = SearchQuery.initial();
|
||||||
|
searchInputController.clear();
|
||||||
|
FocusScope.of(context).unfocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
void clearSearchText() {
|
||||||
|
searchQuery.value = SearchQuery.initial();
|
||||||
|
searchFocus.requestFocus();
|
||||||
|
listMailboxSearched.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void searchMailbox(String value) {
|
||||||
|
searchQuery.value = SearchQuery(value);
|
||||||
|
_searchMailboxAction(allMailboxes, searchQuery.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _searchMailboxAction(List<PresentationMailbox> allMailboxes, SearchQuery searchQuery) {
|
||||||
|
if (searchQuery.value.isNotEmpty) {
|
||||||
|
consumeState(_searchMailboxInteractor.execute(allMailboxes, searchQuery));
|
||||||
|
} else {
|
||||||
|
listMailboxSearched.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _searchMailboxSuccess(SearchMailboxSuccess success) {
|
||||||
|
final mailboxesSearchedWithPath = findMailboxPath(success.mailboxesSearched);
|
||||||
|
listMailboxSearched.value = mailboxesSearchedWithPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
void _searchMailboxFailure(SearchMailboxFailure failure) {
|
||||||
|
listMailboxSearched.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void selectMailboxAction(PresentationMailbox? destinationMailbox) {
|
void selectMailboxAction(PresentationMailbox? destinationMailbox) {
|
||||||
popBack(result: destinationMailbox);
|
popBack(result: destinationMailbox);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,12 @@ import 'package:tmail_ui_user/features/destination_picker/presentation/destinati
|
|||||||
import 'package:tmail_ui_user/features/destination_picker/presentation/model/destination_picker_arguments.dart';
|
import 'package:tmail_ui_user/features/destination_picker/presentation/model/destination_picker_arguments.dart';
|
||||||
import 'package:tmail_ui_user/features/destination_picker/presentation/widgets/app_bar_destination_picker_builder.dart';
|
import 'package:tmail_ui_user/features/destination_picker/presentation/widgets/app_bar_destination_picker_builder.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_actions.dart';
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_actions.dart';
|
||||||
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_categories.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_displayed.dart';
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_displayed.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_node.dart';
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_node.dart';
|
||||||
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/mailbox_folder_tile_builder.dart';
|
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/mailbox_folder_tile_builder.dart';
|
||||||
|
import 'package:tmail_ui_user/features/mailbox/presentation/widgets/mailbox_search_tile_builder.dart';
|
||||||
|
import 'package:tmail_ui_user/features/thread/presentation/widgets/search_app_bar_widget.dart';
|
||||||
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
class DestinationPickerView extends GetWidget<DestinationPickerController> {
|
class DestinationPickerView extends GetWidget<DestinationPickerController> {
|
||||||
@@ -35,153 +38,126 @@ class DestinationPickerView extends GetWidget<DestinationPickerController> {
|
|||||||
onTap: () => controller.closeDestinationPicker(),
|
onTap: () => controller.closeDestinationPicker(),
|
||||||
child: ResponsiveWidget(
|
child: ResponsiveWidget(
|
||||||
responsiveUtils: _responsiveUtils,
|
responsiveUtils: _responsiveUtils,
|
||||||
mobile: _responsiveUtils.isPortrait(context)
|
mobile: _responsiveUtils.isLandscapeMobile(context)
|
||||||
? Container(child: _buildBodyMailboxLocation(context, actions), width: _responsiveUtils.getSizeScreenWidth(context))
|
? Row(children: [
|
||||||
: _buildBodyMailboxDestination(context, actions),
|
SizedBox(child: _buildBodyMailboxLocation(context, actions), width: _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
tablet: Container(
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
child: Row(
|
])
|
||||||
children: [
|
: SizedBox(child: _buildBodyMailboxLocation(context, actions), width: double.infinity),
|
||||||
Expanded(flex: 1, child: Container(color: Colors.transparent)),
|
tablet: Row(children: [
|
||||||
Expanded(flex: 1, child: _buildBodyMailboxLocation(context, actions)),
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
]
|
SizedBox(
|
||||||
)
|
child: _buildBodyMailboxLocation(context, actions),
|
||||||
),
|
width: _responsiveUtils.getSizeScreenWidth(context) - _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
tabletLarge: Container(
|
]),
|
||||||
child: Row(
|
tabletLarge: Row(children: [
|
||||||
children: [
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
Expanded(flex: 7, child: Container(color: Colors.transparent)),
|
SizedBox(
|
||||||
Expanded(flex: 13, child: _buildBodyMailboxLocation(context, actions)),
|
child: _buildBodyMailboxLocation(context, actions),
|
||||||
]
|
width: _responsiveUtils.getSizeScreenWidth(context) - _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
)
|
]),
|
||||||
),
|
desktop: Row(children: [
|
||||||
desktop: Container(
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
child: Row(
|
SizedBox(
|
||||||
children: [
|
child: _buildBodyMailboxLocation(context, actions),
|
||||||
Expanded(flex: 1, child: Container(color: Colors.transparent)),
|
width: _responsiveUtils.getSizeScreenWidth(context) - _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
Expanded(flex: 3, child: _buildBodyMailboxLocation(context, actions)),
|
]),
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
return PointerInterceptor(child: _buildBodyMailboxDestination(context, actions));
|
return PointerInterceptor(child: Card(
|
||||||
|
margin: EdgeInsets.zero,
|
||||||
|
borderOnForeground: false,
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () => controller.closeDestinationPicker(),
|
||||||
|
child: ResponsiveWidget(
|
||||||
|
responsiveUtils: _responsiveUtils,
|
||||||
|
mobile: _responsiveUtils.isLandscapeMobile(context)
|
||||||
|
? Row(children: [
|
||||||
|
SizedBox(child: _buildBodyMailboxLocation(context, actions), width: _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
|
])
|
||||||
|
: SizedBox(child: _buildBodyMailboxLocation(context, actions), width: double.infinity),
|
||||||
|
tablet: Row(children: [
|
||||||
|
SizedBox(child: _buildBodyMailboxLocation(context, actions), width: _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
|
]),
|
||||||
|
tabletLarge: Row(children: [
|
||||||
|
SizedBox(child: _buildBodyMailboxLocation(context, actions), width: _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
|
]),
|
||||||
|
desktop: Row(children: [
|
||||||
|
SizedBox(child: _buildBodyMailboxLocation(context, actions), width: _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildBodyMailboxDestination(BuildContext context, MailboxActions? actions) {
|
|
||||||
return GestureDetector(
|
|
||||||
onTap: () => controller.closeDestinationPicker(),
|
|
||||||
child: Card(
|
|
||||||
margin: EdgeInsets.zero,
|
|
||||||
borderOnForeground: false,
|
|
||||||
color: Colors.transparent,
|
|
||||||
child: Container(
|
|
||||||
margin: _getMarginDestinationPicker(context),
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius: _radiusDestinationPicker(context, 14),
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () => {},
|
|
||||||
child: SafeArea(
|
|
||||||
top: _responsiveUtils.isMobile(context) ? true : false,
|
|
||||||
bottom: false,
|
|
||||||
right: false,
|
|
||||||
left: false,
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
_buildAppBar(context),
|
|
||||||
Expanded(child:
|
|
||||||
Container(
|
|
||||||
color: AppColor.colorBgMailbox,
|
|
||||||
child: _buildBodyDestinationPicker(context, actions)))
|
|
||||||
],
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _buildBodyMailboxLocation(BuildContext context, MailboxActions? actions) {
|
Widget _buildBodyMailboxLocation(BuildContext context, MailboxActions? actions) {
|
||||||
return SafeArea(
|
return SafeArea(top: _responsiveUtils.isPortraitMobile(context), bottom: false, left: false, right: false,
|
||||||
top: _responsiveUtils.isMobile(context) ? true : false,
|
|
||||||
bottom: false,
|
|
||||||
left: false,
|
|
||||||
right: false,
|
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topRight: Radius.circular(_responsiveUtils.isMobile(context) ? 14 : 0),
|
topRight: Radius.circular(_responsiveUtils.isPortraitMobile(context) ? 14 : 0),
|
||||||
topLeft: Radius.circular(_responsiveUtils.isMobile(context) ? 14 : 0)),
|
topLeft: Radius.circular(_responsiveUtils.isPortraitMobile(context) ? 14 : 0)),
|
||||||
child: Drawer(
|
child: Container(
|
||||||
child: Container(
|
color: Colors.white,
|
||||||
color: AppColor.colorBgMailbox,
|
child: Column(children: [
|
||||||
width: double.infinity,
|
SafeArea(left: false, right: false, bottom: false, child: _buildAppBar(context)),
|
||||||
child: SafeArea(
|
Divider(color: AppColor.colorDividerMailbox, height: 0.5, thickness: 0.2),
|
||||||
top: false,
|
Obx(() => controller.isSearchActive()
|
||||||
bottom: false,
|
? SafeArea(bottom: false, top: false, right: false, child: _buildInputSearchFormWidget(context))
|
||||||
left: _responsiveUtils.isMobileDevice(context) ? true : false,
|
: SizedBox.shrink()),
|
||||||
right: _responsiveUtils.isMobileDevice(context) ? true : false,
|
Expanded(child: Container(
|
||||||
child: Column(
|
color: actions == MailboxActions.create ? AppColor.colorBgMailbox : Colors.white,
|
||||||
children: [
|
child: SafeArea(
|
||||||
_buildAppBar(context),
|
top: false,
|
||||||
Expanded(
|
bottom: false,
|
||||||
child: Container(
|
left: _responsiveUtils.isLandscapeMobile(context) ? true : false,
|
||||||
color: AppColor.colorBgMailbox,
|
right: false,
|
||||||
child: _buildBodyDestinationPicker(context, actions)
|
child: _buildBodyDestinationPicker(context, actions))))
|
||||||
)
|
])
|
||||||
)
|
|
||||||
]
|
|
||||||
),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildAppBar(BuildContext context) {
|
Widget _buildAppBar(BuildContext context) {
|
||||||
return Obx(() => (AppBarDestinationPickerBuilder(
|
return Obx(() => (AppBarDestinationPickerBuilder(context, _imagePaths, controller.mailboxAction.value)
|
||||||
context,
|
|
||||||
_imagePaths,
|
|
||||||
_responsiveUtils,
|
|
||||||
controller.mailboxAction.value)
|
|
||||||
..addCloseActionClick(() => controller.closeDestinationPicker()))
|
..addCloseActionClick(() => controller.closeDestinationPicker()))
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildSearchBarWidget(BuildContext context) {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: _responsiveUtils.isMobile(context) ? 12 : 0,
|
||||||
|
left: _responsiveUtils.isMobile(context) && _responsiveUtils.isLandscape(context) ? 0 : 16,
|
||||||
|
right: 16),
|
||||||
|
child: (SearchBarView(_imagePaths)
|
||||||
|
..hintTextSearch(AppLocalizations.of(context).hint_search_mailboxes)
|
||||||
|
..addOnOpenSearchViewAction(() => controller.enableSearch()))
|
||||||
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildBodyDestinationPicker(BuildContext context, MailboxActions? actions) {
|
Widget _buildBodyDestinationPicker(BuildContext context, MailboxActions? actions) {
|
||||||
return RefreshIndicator(
|
return RefreshIndicator(
|
||||||
color: AppColor.primaryColor,
|
color: AppColor.primaryColor,
|
||||||
onRefresh: () async => controller.getAllMailboxAction(),
|
onRefresh: () async => controller.getAllMailboxAction(),
|
||||||
child: SingleChildScrollView(
|
child: Obx(() => controller.isSearchActive()
|
||||||
physics: AlwaysScrollableScrollPhysics(),
|
? _buildListMailboxSearched(context)
|
||||||
child: Container(
|
: _buildListMailbox(context, actions)));
|
||||||
alignment: Alignment.center,
|
|
||||||
color: AppColor.colorBgMailbox,
|
|
||||||
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.max,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
_buildLoadingView(),
|
|
||||||
if (actions == MailboxActions.create) _buildUnifiedMailbox(context),
|
|
||||||
_buildListMailbox(context, actions)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildLoadingView() {
|
Widget _buildLoadingView() {
|
||||||
return Obx(() => controller.viewState.value.fold(
|
return Obx(() => controller.viewState.value.fold(
|
||||||
(failure) => SizedBox.shrink(),
|
(failure) => SizedBox.shrink(),
|
||||||
(success) => success is LoadingState
|
(success) => success is LoadingState
|
||||||
? Center(
|
? Center(child: Padding(
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(top: 16),
|
padding: EdgeInsets.only(top: 16),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 24,
|
width: 24,
|
||||||
@@ -195,130 +171,125 @@ class DestinationPickerView extends GetWidget<DestinationPickerController> {
|
|||||||
primary: false,
|
primary: false,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
if (actions == MailboxActions.moveEmail) _buildSearchBarWidget(context),
|
||||||
decoration: BoxDecoration(
|
_buildLoadingView(),
|
||||||
borderRadius: BorderRadius.circular(14),
|
if (actions == MailboxActions.create) _buildUnifiedMailbox(context),
|
||||||
color: Colors.white),
|
SizedBox(height: 12),
|
||||||
margin: EdgeInsets.only(left: 16, right: 16, top: 10),
|
Obx(() => controller.defaultMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
||||||
child: _buildDefaultMailbox(context)),
|
? _buildMailboxCategory(context, MailboxCategories.exchange, controller.defaultMailboxTree.value.root, actions)
|
||||||
Container(
|
: SizedBox.shrink()),
|
||||||
decoration: BoxDecoration(
|
if (actions == MailboxActions.create) SizedBox(height: 12),
|
||||||
borderRadius: BorderRadius.circular(14),
|
if (actions != MailboxActions.create)
|
||||||
color: Colors.white),
|
Padding(
|
||||||
margin: EdgeInsets.only(left: 16, right: 16, top: 10, bottom: 20),
|
padding: EdgeInsets.only(left: 60),
|
||||||
child: _buildFolderMailbox(context)),
|
child: Divider(color: AppColor.lineItemListColor, height: 0.5, thickness: 0.2)),
|
||||||
|
Obx(() => controller.folderMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
||||||
|
? _buildMailboxCategory(context, MailboxCategories.folders, controller.folderMailboxTree.value.root, actions)
|
||||||
|
: SizedBox.shrink()),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildDefaultMailbox(BuildContext context) {
|
Widget _buildMailboxCategory(BuildContext context, MailboxCategories categories, MailboxNode mailboxNode, MailboxActions? actions) {
|
||||||
return Obx(() => controller.defaultMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
if (actions == MailboxActions.moveEmail) {
|
||||||
? Transform(
|
return _buildBodyMailboxCategory(context, categories, mailboxNode, actions);
|
||||||
transform: Matrix4.translationValues(-4.0, 0.0, 0.0),
|
}
|
||||||
child: Padding(
|
return Column(children: [
|
||||||
padding: EdgeInsets.only(top: 10, bottom: 10),
|
_buildHeaderMailboxCategory(context, categories),
|
||||||
child: TreeView(
|
AnimatedContainer(
|
||||||
startExpanded: false,
|
duration: Duration(milliseconds: 400),
|
||||||
key: Key('default_mailbox_list'),
|
child: categories.getExpandMode(controller.mailboxCategoriesExpandMode.value) == ExpandMode.EXPAND
|
||||||
children: _buildListChildTileWidget(context, controller.defaultMailboxTree.value.root)
|
? _buildBodyMailboxCategory(context, categories, mailboxNode, actions)
|
||||||
)
|
: Offstage())
|
||||||
)
|
]);
|
||||||
)
|
|
||||||
: SizedBox.shrink()
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildFolderMailbox(BuildContext context) {
|
Widget _buildHeaderMailboxCategory(BuildContext context, MailboxCategories categories) {
|
||||||
return Obx(() => controller.folderMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
return Padding(
|
||||||
? Padding(
|
padding: EdgeInsets.only(
|
||||||
padding: EdgeInsets.only(top: 8, bottom: 8),
|
left: _responsiveUtils.isMobile(context) && _responsiveUtils.isLandscape(context) ? 8 : 28,
|
||||||
child: TreeView(
|
right: 16),
|
||||||
startExpanded: false,
|
child: Row(children: [
|
||||||
key: Key('folder_mailbox_list'),
|
Expanded(child: Text(categories.getTitle(context),
|
||||||
children: _buildListChildTileWidget(context, controller.folderMailboxTree.value.root)))
|
maxLines: 1,
|
||||||
: SizedBox.shrink()
|
overflow: TextOverflow.ellipsis,
|
||||||
);
|
style: TextStyle(fontSize: 20, color: Colors.black, fontWeight: FontWeight.bold))),
|
||||||
|
buildIconWeb(
|
||||||
|
icon: SvgPicture.asset(
|
||||||
|
categories.getExpandMode(controller.mailboxCategoriesExpandMode.value) == ExpandMode.EXPAND
|
||||||
|
? _imagePaths.icExpandFolder
|
||||||
|
: _imagePaths.icCollapseFolder,
|
||||||
|
color: AppColor.primaryColor, fit: BoxFit.fill),
|
||||||
|
tooltip: AppLocalizations.of(context).collapse,
|
||||||
|
onTap: () => controller.toggleMailboxCategories(categories))
|
||||||
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _buildListChildTileWidget(BuildContext context, MailboxNode parentNode) {
|
Widget _buildBodyMailboxCategory(BuildContext context, MailboxCategories categories, MailboxNode mailboxNode, MailboxActions? actions) {
|
||||||
|
final lastNode = mailboxNode.childrenItems?.last;
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(14), color: Colors.white),
|
||||||
|
margin: EdgeInsets.only(left: actions == MailboxActions.moveEmail ? 8 : 16, right: actions == MailboxActions.moveEmail ? 0 : 16),
|
||||||
|
padding: EdgeInsets.only(left: 12, right: 8),
|
||||||
|
child: TreeView(
|
||||||
|
key: Key('${categories.keyValue}_mailbox_list'),
|
||||||
|
children: _buildListChildTileWidget(context, mailboxNode, lastNode: lastNode)));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Widget> _buildListChildTileWidget(BuildContext context, MailboxNode parentNode, {MailboxNode? lastNode}) {
|
||||||
return parentNode.childrenItems
|
return parentNode.childrenItems
|
||||||
?.map((mailboxNode) => mailboxNode.hasChildren()
|
?.map((mailboxNode) => mailboxNode.hasChildren()
|
||||||
? Padding(
|
? TreeViewChild(
|
||||||
padding: EdgeInsets.only(left: 20),
|
|
||||||
child: TreeViewChild(
|
|
||||||
context,
|
context,
|
||||||
key: Key('children_tree_mailbox_child'),
|
key: Key('children_tree_mailbox_child'),
|
||||||
isExpanded: mailboxNode.expandMode == ExpandMode.EXPAND,
|
isExpanded: mailboxNode.expandMode == ExpandMode.EXPAND,
|
||||||
parent: (MailBoxFolderTileBuilder(
|
parent: (MailBoxFolderTileBuilder(context, _imagePaths, mailboxNode,
|
||||||
context,
|
lastNode: lastNode,
|
||||||
_imagePaths,
|
|
||||||
mailboxNode,
|
|
||||||
mailboxDisplayed: MailboxDisplayed.destinationPicker)
|
mailboxDisplayed: MailboxDisplayed.destinationPicker)
|
||||||
..addOnOpenMailboxFolderClick(_handleOpenMailboxClick)
|
..addOnOpenMailboxFolderClick(_handleOpenMailboxClick)
|
||||||
..addOnExpandFolderActionClick((mailboxNode) => controller.toggleMailboxFolder(mailboxNode)))
|
..addOnExpandFolderActionClick((mailboxNode) => controller.toggleMailboxFolder(mailboxNode)))
|
||||||
.build(),
|
.build(),
|
||||||
children: _buildListChildTileWidget(context, mailboxNode)
|
children: _buildListChildTileWidget(context, mailboxNode)
|
||||||
).build())
|
).build()
|
||||||
: Padding(
|
: (MailBoxFolderTileBuilder(context, _imagePaths, mailboxNode, lastNode: lastNode,
|
||||||
padding: EdgeInsets.only(left: 20),
|
mailboxDisplayed: MailboxDisplayed.destinationPicker)
|
||||||
child: (MailBoxFolderTileBuilder(
|
..addOnOpenMailboxFolderClick(_handleOpenMailboxClick))
|
||||||
context,
|
.build())
|
||||||
_imagePaths,
|
|
||||||
mailboxNode,
|
|
||||||
mailboxDisplayed: MailboxDisplayed.destinationPicker)
|
|
||||||
..addOnOpenMailboxFolderClick(_handleOpenMailboxClick))
|
|
||||||
.build(),
|
|
||||||
))
|
|
||||||
.toList() ?? <Widget>[];
|
.toList() ?? <Widget>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
EdgeInsets _getMarginDestinationPicker(BuildContext context) {
|
Widget _buildListMailboxSearched(BuildContext context) {
|
||||||
if (_responsiveUtils.isMobileDevice(context) && _responsiveUtils.isLandscape(context)) {
|
return Obx(() => Container(
|
||||||
return EdgeInsets.only(
|
margin: _responsiveUtils.isDesktop(context)
|
||||||
left: _responsiveUtils.tabletHorizontalMargin,
|
? EdgeInsets.only(left: 16, right: 16)
|
||||||
right: _responsiveUtils.tabletHorizontalMargin,
|
: EdgeInsets.zero,
|
||||||
top: 50.0);
|
decoration: _responsiveUtils.isDesktop(context)
|
||||||
} else if (_responsiveUtils.isTablet(context)) {
|
? BoxDecoration(borderRadius: BorderRadius.circular(14), color: Colors.white)
|
||||||
return _responsiveUtils.getSizeScreenHeight(context) <= _responsiveUtils.tabletVerticalMargin * 2
|
: null,
|
||||||
? EdgeInsets.symmetric(
|
child: ListView.builder(
|
||||||
horizontal: _responsiveUtils.tabletHorizontalMargin,
|
padding: EdgeInsets.only(left: 16, right: 8),
|
||||||
vertical: 0.0)
|
key: Key('list_mailbox_searched'),
|
||||||
: EdgeInsets.symmetric(
|
itemCount: controller.listMailboxSearched.length,
|
||||||
horizontal: _responsiveUtils.tabletHorizontalMargin,
|
shrinkWrap: true,
|
||||||
vertical: _responsiveUtils.tabletVerticalMargin);
|
primary: false,
|
||||||
} else if (_responsiveUtils.isDesktop(context) || _responsiveUtils.isTabletLarge(context)) {
|
itemBuilder: (context, index) =>
|
||||||
return _responsiveUtils.getSizeScreenHeight(context) <= _responsiveUtils.desktopVerticalMargin * 2
|
Obx(() => (MailboxSearchTileBuilder(
|
||||||
? EdgeInsets.symmetric(
|
_imagePaths,
|
||||||
horizontal: _responsiveUtils.desktopHorizontalMargin,
|
controller.listMailboxSearched[index],
|
||||||
vertical: 0.0)
|
lastMailbox: controller.listMailboxSearched.last)
|
||||||
: EdgeInsets.symmetric(
|
..addOnOpenMailboxAction((mailbox) => controller.selectMailboxAction(mailbox)))
|
||||||
horizontal: _responsiveUtils.desktopHorizontalMargin,
|
.build())
|
||||||
vertical: _responsiveUtils.desktopVerticalMargin);
|
)
|
||||||
} else {
|
));
|
||||||
return EdgeInsets.zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BorderRadius _radiusDestinationPicker(BuildContext context, double radius) {
|
|
||||||
if (_responsiveUtils.isMobileDevice(context) && _responsiveUtils.isLandscape(context)) {
|
|
||||||
return BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius));
|
|
||||||
} else if (_responsiveUtils.isTablet(context)) {
|
|
||||||
return _responsiveUtils.getSizeScreenHeight(context) <= _responsiveUtils.tabletVerticalMargin * 2
|
|
||||||
? BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius))
|
|
||||||
: BorderRadius.circular(radius);
|
|
||||||
} else if (_responsiveUtils.isDesktop(context) || _responsiveUtils.isTabletLarge(context)) {
|
|
||||||
return _responsiveUtils.getSizeScreenHeight(context) <= _responsiveUtils.desktopVerticalMargin * 2
|
|
||||||
? BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius))
|
|
||||||
: BorderRadius.circular(radius);
|
|
||||||
} else {
|
|
||||||
return BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildUnifiedMailbox(BuildContext context) {
|
Widget _buildUnifiedMailbox(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
margin: EdgeInsets.only(left: 16, right: 16, top: 16),
|
margin: EdgeInsets.only(
|
||||||
|
left: !_responsiveUtils.isLandscapeMobile(context) ? 16 : 0,
|
||||||
|
right: 16),
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(14), color: Colors.white),
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(14), color: Colors.white),
|
||||||
child: MediaQuery(
|
child: MediaQuery(
|
||||||
data: MediaQueryData(padding: EdgeInsets.zero),
|
data: MediaQueryData(padding: EdgeInsets.zero),
|
||||||
@@ -358,4 +329,32 @@ class DestinationPickerView extends GetWidget<DestinationPickerController> {
|
|||||||
}
|
}
|
||||||
controller.selectMailboxAction(presentationMailbox);
|
controller.selectMailboxAction(presentationMailbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildInputSearchFormWidget(BuildContext context) {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.only(top: 16, bottom: 16),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Padding(padding: EdgeInsets.only(left: 5), child: buildIconWeb(
|
||||||
|
icon: SvgPicture.asset(_imagePaths.icBack, color: AppColor.colorTextButton, fit: BoxFit.fill),
|
||||||
|
onTap: () => controller.disableSearch(context))),
|
||||||
|
Expanded(child: (SearchAppBarWidget(context, _imagePaths, _responsiveUtils,
|
||||||
|
controller.searchQuery.value,
|
||||||
|
controller.searchFocus,
|
||||||
|
controller.searchInputController,
|
||||||
|
hasBackButton: false,
|
||||||
|
hasSearchButton: true)
|
||||||
|
..addPadding(EdgeInsets.zero)
|
||||||
|
..setMargin(EdgeInsets.only(right: 16))
|
||||||
|
..addDecoration(BoxDecoration(borderRadius: BorderRadius.circular(12), color: AppColor.colorBgSearchBar))
|
||||||
|
..addIconClearText(SvgPicture.asset(_imagePaths.icClearTextSearch, width: 20, height: 20, fit: BoxFit.fill))
|
||||||
|
..setHintText(AppLocalizations.of(context).hint_search_mailboxes)
|
||||||
|
..addOnClearTextSearchAction(() => controller.clearSearchText())
|
||||||
|
..addOnTextChangeSearchAction((query) => controller.searchMailbox(query))
|
||||||
|
..addOnSearchTextAction((query) => controller.searchMailbox(query)))
|
||||||
|
.build())
|
||||||
|
]
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+30
-37
@@ -3,6 +3,7 @@ import 'package:core/core.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/mailbox/presentation/model/mailbox_actions.dart';
|
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_actions.dart';
|
||||||
|
import 'package:tmail_ui_user/main/localizations/app_localizations.dart';
|
||||||
|
|
||||||
typedef OnCloseActionClick = void Function();
|
typedef OnCloseActionClick = void Function();
|
||||||
|
|
||||||
@@ -11,13 +12,11 @@ class AppBarDestinationPickerBuilder {
|
|||||||
|
|
||||||
final BuildContext _context;
|
final BuildContext _context;
|
||||||
final ImagePaths _imagePaths;
|
final ImagePaths _imagePaths;
|
||||||
final ResponsiveUtils _responsiveUtils;
|
|
||||||
final MailboxActions? _mailboxAction;
|
final MailboxActions? _mailboxAction;
|
||||||
|
|
||||||
AppBarDestinationPickerBuilder(
|
AppBarDestinationPickerBuilder(
|
||||||
this._context,
|
this._context,
|
||||||
this._imagePaths,
|
this._imagePaths,
|
||||||
this._responsiveUtils,
|
|
||||||
this._mailboxAction,
|
this._mailboxAction,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -29,65 +28,59 @@ class AppBarDestinationPickerBuilder {
|
|||||||
return Container(
|
return Container(
|
||||||
key: Key('app_bar_destination_picker'),
|
key: Key('app_bar_destination_picker'),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 8),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)),
|
borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)),
|
||||||
color: Colors.white),
|
color: Colors.white),
|
||||||
|
height: 52,
|
||||||
child: MediaQuery(
|
child: MediaQuery(
|
||||||
data: MediaQueryData(padding: EdgeInsets.zero),
|
data: MediaQueryData(padding: EdgeInsets.zero),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
_buildBackButton(),
|
_buildBackButton(),
|
||||||
Expanded(child: _buildTitle())
|
Expanded(child: _buildTitle()),
|
||||||
|
_buildCancelButton(),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _buildCancelButton() {
|
||||||
|
if (_mailboxAction == MailboxActions.moveEmail) {
|
||||||
|
return Padding(
|
||||||
|
padding: EdgeInsets.only(right: 12),
|
||||||
|
child: Material(
|
||||||
|
borderRadius: BorderRadius.circular(20),
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: TextButton(
|
||||||
|
child: Text(
|
||||||
|
AppLocalizations.of(_context).cancel,
|
||||||
|
style: TextStyle(fontSize: 17, color: AppColor.colorTextButton)),
|
||||||
|
onPressed: () => _onCloseActionClick?.call()
|
||||||
|
)
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
return SizedBox(width: 40, height: 40);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Widget _buildBackButton() {
|
Widget _buildBackButton() {
|
||||||
if (_mailboxAction == MailboxActions.create) {
|
if (_mailboxAction == MailboxActions.create) {
|
||||||
if (_responsiveUtils.isMobile(_context)) {
|
return buildIconWeb(
|
||||||
return Material(
|
icon: SvgPicture.asset(_imagePaths.icBack, color: AppColor.colorTextButton, fit: BoxFit.fill),
|
||||||
color: Colors.transparent,
|
onTap: () => _onCloseActionClick?.call());
|
||||||
shape: CircleBorder(),
|
|
||||||
child: IconButton(
|
|
||||||
splashRadius: 20,
|
|
||||||
icon: SvgPicture.asset(_imagePaths.icBack, color: AppColor.colorTextButton, fit: BoxFit.fill),
|
|
||||||
onPressed: () => _onCloseActionClick?.call()));
|
|
||||||
} else {
|
|
||||||
return SizedBox(width: 40, height: 40);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return Material(
|
return SizedBox(width: 100, height: 40);
|
||||||
color: Colors.transparent,
|
|
||||||
shape: CircleBorder(),
|
|
||||||
child: IconButton(
|
|
||||||
splashRadius: 20,
|
|
||||||
icon: SvgPicture.asset(_imagePaths.icComposerClose, color: AppColor.baseTextColor, fit: BoxFit.fill),
|
|
||||||
onPressed: () => _onCloseActionClick?.call()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildTitle() {
|
Widget _buildTitle() {
|
||||||
return Padding(
|
return Text(
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: 12,
|
|
||||||
right: 47),
|
|
||||||
child: Text(
|
|
||||||
_mailboxAction?.getTitle(_context) ?? '',
|
_mailboxAction?.getTitle(_context) ?? '',
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
textAlign: _getAlignTitle(),
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(fontSize: 17, color: AppColor.colorNameEmail, fontWeight: FontWeight.w700)));
|
style: TextStyle(fontSize: 20, color: AppColor.colorNameEmail, fontWeight: FontWeight.w700));
|
||||||
}
|
|
||||||
|
|
||||||
TextAlign _getAlignTitle() {
|
|
||||||
if (_mailboxAction == MailboxActions.create) {
|
|
||||||
return TextAlign.center;
|
|
||||||
} else {
|
|
||||||
return _responsiveUtils.isMobile(_context) ? TextAlign.start : TextAlign.center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ class AppBarMailWidgetBuilder {
|
|||||||
children: [
|
children: [
|
||||||
buildIconWeb(
|
buildIconWeb(
|
||||||
icon: SvgPicture.asset(_imagePaths.icMoveEmail, fit: BoxFit.fill),
|
icon: SvgPicture.asset(_imagePaths.icMoveEmail, fit: BoxFit.fill),
|
||||||
tooltip: AppLocalizations.of(_context).move_to_mailbox,
|
tooltip: AppLocalizations.of(_context).move_message,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (_presentationEmail != null) {
|
if (_presentationEmail != null) {
|
||||||
_onEmailActionClick?.call(_presentationEmail!, EmailActionType.move);
|
_onEmailActionClick?.call(_presentationEmail!, EmailActionType.move);
|
||||||
|
|||||||
@@ -90,7 +90,6 @@ class MailboxController extends BaseMailboxController {
|
|||||||
final searchFocus = FocusNode();
|
final searchFocus = FocusNode();
|
||||||
final mailboxListScrollController = ScrollController();
|
final mailboxListScrollController = ScrollController();
|
||||||
|
|
||||||
List<PresentationMailbox> allMailboxes = <PresentationMailbox>[];
|
|
||||||
jmapState.State? currentMailboxState;
|
jmapState.State? currentMailboxState;
|
||||||
List<String> listMailboxNameAsStringExist = <String>[];
|
List<String> listMailboxNameAsStringExist = <String>[];
|
||||||
|
|
||||||
@@ -184,19 +183,13 @@ class MailboxController extends BaseMailboxController {
|
|||||||
super.onData(newState);
|
super.onData(newState);
|
||||||
newState.map((success) async {
|
newState.map((success) async {
|
||||||
if (success is GetAllMailboxSuccess) {
|
if (success is GetAllMailboxSuccess) {
|
||||||
log('MailboxController::onData(): ${allMailboxes.length}');
|
|
||||||
allMailboxes = success.mailboxList;
|
|
||||||
currentMailboxState = success.currentMailboxState;
|
currentMailboxState = success.currentMailboxState;
|
||||||
await buildTree(allMailboxes);
|
await buildTree(success.mailboxList);
|
||||||
|
_setUpMapMailboxIdDefault(success.mailboxList, defaultMailboxTree.value, folderMailboxTree.value);
|
||||||
_setUpMapMailboxIdDefault(allMailboxes, defaultMailboxTree.value, folderMailboxTree.value);
|
|
||||||
} else if (success is RefreshChangesAllMailboxSuccess) {
|
} else if (success is RefreshChangesAllMailboxSuccess) {
|
||||||
log('MailboxController::onData(): ${allMailboxes.length}');
|
|
||||||
allMailboxes = success.mailboxList;
|
|
||||||
currentMailboxState = success.currentMailboxState;
|
currentMailboxState = success.currentMailboxState;
|
||||||
await refreshTree(allMailboxes);
|
await refreshTree(success.mailboxList);
|
||||||
|
_setUpMapMailboxIdDefault(success.mailboxList, defaultMailboxTree.value, folderMailboxTree.value);
|
||||||
_setUpMapMailboxIdDefault(allMailboxes, defaultMailboxTree.value, folderMailboxTree.value);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -407,25 +400,10 @@ class MailboxController extends BaseMailboxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _searchMailboxSuccess(SearchMailboxSuccess success) {
|
void _searchMailboxSuccess(SearchMailboxSuccess success) {
|
||||||
final mailboxesSearchedWithPath = _findMailboxPath(success.mailboxesSearched);
|
final mailboxesSearchedWithPath = findMailboxPath(success.mailboxesSearched);
|
||||||
listMailboxSearched.value = mailboxesSearchedWithPath;
|
listMailboxSearched.value = mailboxesSearchedWithPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PresentationMailbox> _findMailboxPath(List<PresentationMailbox> mailboxes) {
|
|
||||||
return mailboxes.map((presentationMailbox) {
|
|
||||||
if (!presentationMailbox.hasParentId()) {
|
|
||||||
return presentationMailbox;
|
|
||||||
} else {
|
|
||||||
final mailboxNodePath = findNodePath(presentationMailbox.id);
|
|
||||||
if (mailboxNodePath != null) {
|
|
||||||
return presentationMailbox.toPresentationMailboxWithMailboxPath(mailboxNodePath);
|
|
||||||
} else {
|
|
||||||
return presentationMailbox;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
void _searchMailboxFailure(SearchMailboxFailure failure) {
|
void _searchMailboxFailure(SearchMailboxFailure failure) {
|
||||||
listMailboxSearched.clear();
|
listMailboxSearched.clear();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
child: RefreshIndicator(
|
child: RefreshIndicator(
|
||||||
color: AppColor.primaryColor,
|
color: AppColor.primaryColor,
|
||||||
onRefresh: () async => controller.refreshAllMailbox(),
|
onRefresh: () async => controller.refreshAllMailbox(),
|
||||||
child:controller.isSearchActive()
|
child: controller.isSearchActive()
|
||||||
? SafeArea(
|
? SafeArea(
|
||||||
bottom: !controller.isSelectionEnabled(),
|
bottom: !controller.isSelectionEnabled(),
|
||||||
top: false,
|
top: false,
|
||||||
@@ -337,11 +337,7 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
context,
|
context,
|
||||||
key: Key('children_tree_mailbox_child'),
|
key: Key('children_tree_mailbox_child'),
|
||||||
isExpanded: mailboxNode.expandMode == ExpandMode.EXPAND,
|
isExpanded: mailboxNode.expandMode == ExpandMode.EXPAND,
|
||||||
parent: Obx(() => (MailBoxFolderTileBuilder(
|
parent: Obx(() => (MailBoxFolderTileBuilder(context, _imagePaths, mailboxNode, lastNode: lastNode,
|
||||||
context,
|
|
||||||
_imagePaths,
|
|
||||||
mailboxNode,
|
|
||||||
lastNode: lastNode,
|
|
||||||
allSelectMode: controller.currentSelectMode.value)
|
allSelectMode: controller.currentSelectMode.value)
|
||||||
..addOnOpenMailboxFolderClick((mailboxNode) => controller.openMailbox(context, mailboxNode.item))
|
..addOnOpenMailboxFolderClick((mailboxNode) => controller.openMailbox(context, mailboxNode.item))
|
||||||
..addOnExpandFolderActionClick((mailboxNode) => controller.toggleMailboxFolder(mailboxNode))
|
..addOnExpandFolderActionClick((mailboxNode) => controller.toggleMailboxFolder(mailboxNode))
|
||||||
@@ -349,15 +345,11 @@ class MailboxView extends GetWidget<MailboxController> {
|
|||||||
.build()),
|
.build()),
|
||||||
children: _buildListChildTileWidget(context, mailboxNode)
|
children: _buildListChildTileWidget(context, mailboxNode)
|
||||||
).build()
|
).build()
|
||||||
: Obx(() => (MailBoxFolderTileBuilder(
|
: Obx(() => (MailBoxFolderTileBuilder(context, _imagePaths, mailboxNode, lastNode: lastNode,
|
||||||
context,
|
allSelectMode: controller.currentSelectMode.value)
|
||||||
_imagePaths,
|
..addOnOpenMailboxFolderClick((mailboxNode) => controller.openMailbox(context, mailboxNode.item))
|
||||||
mailboxNode,
|
..addOnSelectMailboxFolderClick((mailboxNode) => controller.selectMailboxNode(mailboxNode)))
|
||||||
lastNode: lastNode,
|
.build())
|
||||||
allSelectMode: controller.currentSelectMode.value)
|
|
||||||
..addOnOpenMailboxFolderClick((mailboxNode) => controller.openMailbox(context, mailboxNode.item))
|
|
||||||
..addOnSelectMailboxFolderClick((mailboxNode) => controller.selectMailboxNode(mailboxNode)))
|
|
||||||
.build())
|
|
||||||
).toList() ?? <Widget>[];
|
).toList() ?? <Widget>[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ extension MailboxActionsExtension on MailboxActions {
|
|||||||
case MailboxActions.create:
|
case MailboxActions.create:
|
||||||
return AppLocalizations.of(context).mailbox_location;
|
return AppLocalizations.of(context).mailbox_location;
|
||||||
case MailboxActions.moveEmail:
|
case MailboxActions.moveEmail:
|
||||||
return AppLocalizations.of(context).move_to_mailbox;
|
return AppLocalizations.of(context).move_message;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class MailboxSearchTileBuilder {
|
|||||||
),
|
),
|
||||||
if (lastMailbox?.id != _presentationMailbox.id)
|
if (lastMailbox?.id != _presentationMailbox.id)
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: allSelectMode == SelectMode.ACTIVE ? 50 : 45),
|
padding: EdgeInsets.only(left: allSelectMode == SelectMode.ACTIVE ? 50 : 35),
|
||||||
child: Divider(color: AppColor.lineItemListColor, height: 0.5, thickness: 0.2)),
|
child: Divider(color: AppColor.lineItemListColor, height: 0.5, thickness: 0.2)),
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -23,33 +23,19 @@ class MailboxCreatorView extends GetWidget<MailboxCreatorController> {
|
|||||||
onTap: () => controller.closeMailboxCreator(context),
|
onTap: () => controller.closeMailboxCreator(context),
|
||||||
child: ResponsiveWidget(
|
child: ResponsiveWidget(
|
||||||
responsiveUtils: _responsiveUtils,
|
responsiveUtils: _responsiveUtils,
|
||||||
mobile: Container(
|
mobile: SizedBox(child: _buildBody(context), width: double.infinity),
|
||||||
child: _buildBody(context),
|
tablet: Row(children: [
|
||||||
width: _responsiveUtils.getSizeScreenWidth(context)),
|
SizedBox(child: _buildBody(context), width: _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
tablet: Container(
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
child: Row(
|
]),
|
||||||
children: [
|
tabletLarge: Row(children: [
|
||||||
Expanded(flex: 1, child: _buildBody(context)),
|
SizedBox(child: _buildBody(context), width: _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
Expanded(flex: 1, child: Container(color: Colors.transparent)),
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
]
|
]),
|
||||||
)
|
desktop: Row(children: [
|
||||||
),
|
SizedBox(child: _buildBody(context), width: _responsiveUtils.defaultSizeDrawerWidthMobileTablet),
|
||||||
tabletLarge: Container(
|
Expanded(child: Container(color: Colors.transparent)),
|
||||||
child: Row(
|
])
|
||||||
children: [
|
|
||||||
Expanded(flex: 7, child: _buildBody(context)),
|
|
||||||
Expanded(flex: 13, child: Container(color: Colors.transparent)),
|
|
||||||
]
|
|
||||||
)
|
|
||||||
),
|
|
||||||
desktop: Container(
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(flex: 1, child: _buildBody(context)),
|
|
||||||
Expanded(flex: 3, child: Container(color: Colors.transparent)),
|
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
@@ -57,7 +43,7 @@ class MailboxCreatorView extends GetWidget<MailboxCreatorController> {
|
|||||||
|
|
||||||
Widget _buildBody(BuildContext context) {
|
Widget _buildBody(BuildContext context) {
|
||||||
return SafeArea(
|
return SafeArea(
|
||||||
top: _responsiveUtils.isMobile(context) ? true : false,
|
top: _responsiveUtils.isMobile(context),
|
||||||
bottom: false,
|
bottom: false,
|
||||||
left: false,
|
left: false,
|
||||||
right: false,
|
right: false,
|
||||||
@@ -67,23 +53,20 @@ class MailboxCreatorView extends GetWidget<MailboxCreatorController> {
|
|||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topRight: Radius.circular(_responsiveUtils.isMobile(context) ? 14 : 0),
|
topRight: Radius.circular(_responsiveUtils.isMobile(context) ? 14 : 0),
|
||||||
topLeft: Radius.circular(_responsiveUtils.isMobile(context) ? 14 : 0)),
|
topLeft: Radius.circular(_responsiveUtils.isMobile(context) ? 14 : 0)),
|
||||||
child: Drawer(
|
child: Container(
|
||||||
child: Container(
|
color: AppColor.colorBgMailbox,
|
||||||
color: AppColor.colorBgMailbox,
|
child: SafeArea(
|
||||||
width: double.infinity,
|
top: false,
|
||||||
child: SafeArea(
|
bottom: false,
|
||||||
top: false,
|
left: _responsiveUtils.isLandscapeMobile(context) ? true : false,
|
||||||
bottom: false,
|
right: _responsiveUtils.isLandscapeMobile(context) ? true : false,
|
||||||
left: _responsiveUtils.isMobileDevice(context) ? true : false,
|
child: Column(
|
||||||
right: _responsiveUtils.isMobileDevice(context) ? true : false,
|
children: [
|
||||||
child: Column(
|
SafeArea(left: false, right: false, bottom: false, child: _buildAppBar(context)),
|
||||||
children: [
|
_buildCreateMailboxNameInput(context),
|
||||||
_buildAppBar(context),
|
_buildMailboxLocation(context),
|
||||||
_buildCreateMailboxNameInput(context),
|
]
|
||||||
_buildMailboxLocation(context),
|
),
|
||||||
]
|
|
||||||
),
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@@ -125,7 +108,7 @@ class MailboxCreatorView extends GetWidget<MailboxCreatorController> {
|
|||||||
Widget _buildMailboxLocation(BuildContext context) {
|
Widget _buildMailboxLocation(BuildContext context) {
|
||||||
return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 16, right: 16, top: 4),
|
padding: EdgeInsets.only(left: 24, right: 16, top: 16),
|
||||||
child: Text(
|
child: Text(
|
||||||
AppLocalizations.of(context).mailbox_location.toUpperCase(),
|
AppLocalizations.of(context).mailbox_location.toUpperCase(),
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
|
|||||||
+1
-1
@@ -86,6 +86,6 @@ class AppBarMailboxCreatorBuilder {
|
|||||||
child: Text(
|
child: Text(
|
||||||
title ?? '',
|
title ?? '',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(fontSize: 17, color: AppColor.colorNameEmail, fontWeight: FontWeight.w700)));
|
style: TextStyle(fontSize: 20, color: AppColor.colorNameEmail, fontWeight: FontWeight.bold)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ class MailboxDashBoardView extends GetWidget<MailboxDashBoardController> with Ne
|
|||||||
tabletLarge: SizedBox.shrink(),
|
tabletLarge: SizedBox.shrink(),
|
||||||
desktop: SizedBox.shrink()
|
desktop: SizedBox.shrink()
|
||||||
),
|
),
|
||||||
drawerEnableOpenDragGesture: !_responsiveUtils.isDesktop(context),
|
drawerEnableOpenDragGesture: _responsiveUtils.isMobile(context) || _responsiveUtils.isTablet(context),
|
||||||
body: Stack(children: [
|
body: Stack(children: [
|
||||||
ResponsiveWidget(
|
ResponsiveWidget(
|
||||||
responsiveUtils: _responsiveUtils,
|
responsiveUtils: _responsiveUtils,
|
||||||
|
|||||||
@@ -243,13 +243,6 @@ class AppLocalizations {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
String get move_to_mailbox {
|
|
||||||
return Intl.message(
|
|
||||||
'Move to mailbox',
|
|
||||||
name: 'move_to_mailbox',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
String get mark_as_star {
|
String get mark_as_star {
|
||||||
return Intl.message(
|
return Intl.message(
|
||||||
'Star',
|
'Star',
|
||||||
@@ -1097,4 +1090,11 @@ class AppLocalizations {
|
|||||||
name: 'exchange'
|
name: 'exchange'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String get move_message {
|
||||||
|
return Intl.message(
|
||||||
|
'Move message',
|
||||||
|
name: 'move_message',
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user