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