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.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));
},
);
}

View File

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