Add view action

This commit is contained in:
Hillel Coren 2021-09-26 18:40:12 +03:00
parent 45eb420b96
commit e8f361fecc
2 changed files with 2 additions and 9 deletions

View File

@ -20,7 +20,6 @@ class ViewScaffold extends StatelessWidget {
this.appBarBottom, this.appBarBottom,
this.isFilter = false, this.isFilter = false,
this.onBackPressed, this.onBackPressed,
this.showClearSelection = false,
}); });
final bool isFilter; final bool isFilter;
@ -29,7 +28,6 @@ class ViewScaffold extends StatelessWidget {
final Function onBackPressed; final Function onBackPressed;
final Widget floatingActionButton; final Widget floatingActionButton;
final Widget appBarBottom; final Widget appBarBottom;
final bool showClearSelection;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -77,15 +75,11 @@ class ViewScaffold extends StatelessWidget {
tooltip: localization.back, tooltip: localization.back,
icon: Icon(Icons.arrow_back), icon: Icon(Icons.arrow_back),
onPressed: () => store.dispatch(PopPreviewStack())); onPressed: () => store.dispatch(PopPreviewStack()));
} else if (showClearSelection) { } else if (isDesktop(context)) {
leading = IconButton( leading = IconButton(
icon: Icon(Icons.clear), icon: Icon(Icons.clear),
onPressed: () { onPressed: () {
viewEntityById( store.dispatch(UpdateUserPreferences(isPreviewEnabled: false));
entityType: entity.entityType,
entityId: '',
showError: false,
);
}, },
); );
} }

View File

@ -79,7 +79,6 @@ class _TaskViewState extends State<TaskView>
return ViewScaffold( return ViewScaffold(
isFilter: widget.isFilter, isFilter: widget.isFilter,
entity: task, entity: task,
showClearSelection: state.prefState.showKanban,
appBarBottom: TabBar( appBarBottom: TabBar(
controller: _controller, controller: _controller,
isScrollable: false, isScrollable: false,