From e9f3360f0287e40ffa1c7ebcfcdb0fae25b7167b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Wawrzyk?= <lukasz.wawrzyk@gmail.com>
Date: Wed, 14 Feb 2024 03:17:21 +0100
Subject: [PATCH] chore(mobile):  Put the real delete button before other
 delete variants (#6895)

fix: put the real delete button before other delete variants
---
 .../home/ui/control_bottom_app_bar.dart       | 26 +++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/mobile/lib/modules/home/ui/control_bottom_app_bar.dart b/mobile/lib/modules/home/ui/control_bottom_app_bar.dart
index 00cc0e1b33..4324290b47 100644
--- a/mobile/lib/modules/home/ui/control_bottom_app_bar.dart
+++ b/mobile/lib/modules/home/ui/control_bottom_app_bar.dart
@@ -125,6 +125,19 @@ class ControlBottomAppBar extends ConsumerWidget {
                 .tr(),
             onPressed: enabled ? onFavorite : null,
           ),
+        if (hasLocal && hasRemote && onDelete != null)
+          ConstrainedBox(
+            constraints: const BoxConstraints(maxWidth: 90),
+            child: ControlBoxButton(
+              iconData: Icons.delete_sweep_outlined,
+              label: "control_bottom_app_bar_delete".tr(),
+              onPressed: enabled
+                  ? () => handleRemoteDelete(!trashEnabled, onDelete!)
+                  : null,
+              onLongPressed:
+                  enabled ? () => showForceDeleteDialog(onDelete!) : null,
+            ),
+          ),
         if (hasRemote && onDeleteServer != null)
           ConstrainedBox(
             constraints: const BoxConstraints(maxWidth: 85),
@@ -172,19 +185,6 @@ class ControlBottomAppBar extends ConsumerWidget {
                   : null,
             ),
           ),
-        if (hasLocal && hasRemote && onDelete != null)
-          ConstrainedBox(
-            constraints: const BoxConstraints(maxWidth: 90),
-            child: ControlBoxButton(
-              iconData: Icons.delete_sweep_outlined,
-              label: "control_bottom_app_bar_delete".tr(),
-              onPressed: enabled
-                  ? () => handleRemoteDelete(!trashEnabled, onDelete!)
-                  : null,
-              onLongPressed:
-                  enabled ? () => showForceDeleteDialog(onDelete!) : null,
-            ),
-          ),
         if (hasRemote && onEditTime != null)
           ControlBoxButton(
             iconData: Icons.edit_calendar_outlined,