TF-983 Move mailbox search up
This commit is contained in:
@@ -214,14 +214,12 @@ class MailboxView extends GetWidget<MailboxController> {
|
||||
padding: EdgeInsets.only(bottom: controller.isSelectionEnabled() ? 16 : 0),
|
||||
child: Column(children: [
|
||||
Obx(() {
|
||||
if ((controller.isSelectionEnabled() && _responsiveUtils.isLandscapeMobile(context))
|
||||
|| (BuildUtils.isWeb && _responsiveUtils.isDesktop(context))) {
|
||||
if (controller.isSelectionEnabled() && _responsiveUtils.isLandscapeMobile(context)) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return _buildUserInformation(context);
|
||||
}),
|
||||
if ((BuildUtils.isWeb && !_responsiveUtils.isDesktop(context))
|
||||
|| !BuildUtils.isWeb) _buildSearchBarWidget(context),
|
||||
_buildSearchBarWidget(context),
|
||||
_buildLoadingView(),
|
||||
Obx(() => controller.defaultMailboxTree.value.root.childrenItems?.isNotEmpty ?? false
|
||||
? _buildMailboxCategory(context, MailboxCategories.exchange, controller.defaultMailboxTree.value.root)
|
||||
|
||||
@@ -163,20 +163,9 @@ class MailboxView extends GetWidget<MailboxController> with AppLoaderMixin, Popu
|
||||
? _buildMailboxCategory(context, MailboxCategories.exchange, controller.defaultRootNode)
|
||||
: const SizedBox.shrink()),
|
||||
const SizedBox(height: 8),
|
||||
Obx(() {
|
||||
if (controller.folderMailboxHasChild) {
|
||||
return Column(children: const [
|
||||
Divider(color: AppColor.colorDividerMailbox, height: 0.5, thickness: 0.2),
|
||||
SizedBox(height: 8),
|
||||
]);
|
||||
}
|
||||
return const SizedBox.shrink();
|
||||
}),
|
||||
Obx(() => controller.folderMailboxHasChild
|
||||
? _buildMailboxCategory(context, MailboxCategories.folders, controller.folderRootNode)
|
||||
: const SizedBox.shrink()),
|
||||
const SizedBox(height: 8),
|
||||
const Divider(color: AppColor.colorDividerMailbox, height: 0.5, thickness: 0.2),
|
||||
const SizedBox(height: 8),
|
||||
_buildHeaderMailboxCategory(context, MailboxCategories.folders),
|
||||
Row(children: [
|
||||
Expanded(child: _buildSearchBarWidget(context)),
|
||||
Padding(
|
||||
@@ -189,6 +178,9 @@ class MailboxView extends GetWidget<MailboxController> with AppLoaderMixin, Popu
|
||||
tooltip: AppLocalizations.of(context).new_mailbox,
|
||||
onTap: () => controller.goToCreateNewMailboxView())),
|
||||
]),
|
||||
Obx(() => controller.folderMailboxHasChild
|
||||
? _buildMailboxCategory(context, MailboxCategories.folders, controller.folderRootNode)
|
||||
: const SizedBox.shrink()),
|
||||
])
|
||||
);
|
||||
}
|
||||
@@ -211,7 +203,8 @@ class MailboxView extends GetWidget<MailboxController> with AppLoaderMixin, Popu
|
||||
|
||||
Widget _buildHeaderMailboxCategory(BuildContext context, MailboxCategories categories) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 10, bottom: 10,
|
||||
padding: EdgeInsets.only(
|
||||
top: 10,
|
||||
left: _responsiveUtils.isDesktop(context) ? 0 : 16,
|
||||
right: _responsiveUtils.isDesktop(context) ? 0 : 16),
|
||||
child: Row(children: [
|
||||
@@ -257,14 +250,11 @@ class MailboxView extends GetWidget<MailboxController> with AppLoaderMixin, Popu
|
||||
if (categories == MailboxCategories.exchange) {
|
||||
return _buildBodyMailboxCategory(context, categories, mailboxNode);
|
||||
}
|
||||
return Column(children: [
|
||||
_buildHeaderMailboxCategory(context, categories),
|
||||
AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
child: categories.getExpandMode(controller.mailboxCategoriesExpandMode.value) == ExpandMode.EXPAND
|
||||
? _buildBodyMailboxCategory(context, categories, mailboxNode)
|
||||
: const Offstage())
|
||||
]);
|
||||
return AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 400),
|
||||
child: categories.getExpandMode(controller.mailboxCategoriesExpandMode.value) == ExpandMode.EXPAND
|
||||
? _buildBodyMailboxCategory(context, categories, mailboxNode)
|
||||
: const Offstage());
|
||||
}
|
||||
|
||||
List<Widget> _buildListChildTileWidget(BuildContext context,
|
||||
|
||||
Reference in New Issue
Block a user