diff --git a/lib/ui/app/view_scaffold.dart b/lib/ui/app/view_scaffold.dart index cca07c13a..b94f971b5 100644 --- a/lib/ui/app/view_scaffold.dart +++ b/lib/ui/app/view_scaffold.dart @@ -20,7 +20,6 @@ class ViewScaffold extends StatelessWidget { this.appBarBottom, this.isFilter = false, this.onBackPressed, - this.showClearSelection = false, }); final bool isFilter; @@ -29,7 +28,6 @@ class ViewScaffold extends StatelessWidget { final Function onBackPressed; final Widget floatingActionButton; final Widget appBarBottom; - final bool showClearSelection; @override Widget build(BuildContext context) { @@ -77,15 +75,11 @@ class ViewScaffold extends StatelessWidget { tooltip: localization.back, icon: Icon(Icons.arrow_back), onPressed: () => store.dispatch(PopPreviewStack())); - } else if (showClearSelection) { + } else if (isDesktop(context)) { leading = IconButton( icon: Icon(Icons.clear), onPressed: () { - viewEntityById( - entityType: entity.entityType, - entityId: '', - showError: false, - ); + store.dispatch(UpdateUserPreferences(isPreviewEnabled: false)); }, ); } diff --git a/lib/ui/task/view/task_view.dart b/lib/ui/task/view/task_view.dart index a65dec579..cb248ed3b 100644 --- a/lib/ui/task/view/task_view.dart +++ b/lib/ui/task/view/task_view.dart @@ -79,7 +79,6 @@ class _TaskViewState extends State return ViewScaffold( isFilter: widget.isFilter, entity: task, - showClearSelection: state.prefState.showKanban, appBarBottom: TabBar( controller: _controller, isScrollable: false,