diff --git a/lib/redux/ui/pref_state.dart b/lib/redux/ui/pref_state.dart index 88a824385..8298ff9b9 100644 --- a/lib/redux/ui/pref_state.dart +++ b/lib/redux/ui/pref_state.dart @@ -121,10 +121,6 @@ abstract class PrefState implements Built { return false; } - if (!isPreviewEnabled) { - return true; - } - return !(useSidebarEditor[entityType] ?? false); } diff --git a/lib/ui/app/main_screen.dart b/lib/ui/app/main_screen.dart index d028e2881..ffbee1772 100644 --- a/lib/ui/app/main_screen.dart +++ b/lib/ui/app/main_screen.dart @@ -408,8 +408,10 @@ class EntityScreens extends StatelessWidget { break; } } - } else if (subRoute == 'edit' && !editingFilterEntity) { - switch (entityType) { + } else if (subRoute == 'edit') { + final editEntityType = + editingFilterEntity ? uiState.filterEntityType : entityType; + switch (editEntityType) { case EntityType.client: child = ClientEditScreen(); break; diff --git a/lib/ui/client/edit/client_edit_footer.dart b/lib/ui/client/edit/client_edit_footer.dart index 70b9548bd..ea8f5c9dd 100644 --- a/lib/ui/client/edit/client_edit_footer.dart +++ b/lib/ui/client/edit/client_edit_footer.dart @@ -21,8 +21,7 @@ class ClientEditFooter extends StatelessWidget { final state = store.state; final useSidebarEditor = state.prefState.useSidebarEditor[EntityType.client] ?? false; - final showLayoutToggle = - isDesktop(context) && state.prefState.isPreviewEnabled; + final showLayoutToggle = isDesktop(context); return BottomAppBar( elevation: 0, diff --git a/lib/ui/invoice/edit/invoice_edit_footer.dart b/lib/ui/invoice/edit/invoice_edit_footer.dart index e6bc10122..5e24ddd29 100644 --- a/lib/ui/invoice/edit/invoice_edit_footer.dart +++ b/lib/ui/invoice/edit/invoice_edit_footer.dart @@ -27,8 +27,7 @@ class InvoiceEditFooter extends StatelessWidget { clientId: invoice.clientId); final useSidebarEditor = state.prefState.useSidebarEditor[EntityType.invoice] ?? false; - final showLayoutToggle = - isDesktop(context) && state.prefState.isPreviewEnabled; + final showLayoutToggle = isDesktop(context); return BottomAppBar( elevation: 0, diff --git a/lib/ui/vendor/edit/vendor_edit_footer.dart b/lib/ui/vendor/edit/vendor_edit_footer.dart index 90001e031..d269c5c01 100644 --- a/lib/ui/vendor/edit/vendor_edit_footer.dart +++ b/lib/ui/vendor/edit/vendor_edit_footer.dart @@ -21,8 +21,7 @@ class VendorEditFooter extends StatelessWidget { final state = store.state; final useSidebarEditor = state.prefState.useSidebarEditor[EntityType.vendor] ?? false; - final showLayoutToggle = - isDesktop(context) && state.prefState.isPreviewEnabled; + final showLayoutToggle = isDesktop(context); return BottomAppBar( elevation: 0,