Navigation refactor

This commit is contained in:
Hillel Coren 2020-06-16 14:46:08 +03:00
parent 007b8ef632
commit 624e9c113d
2 changed files with 9 additions and 5 deletions

View File

@ -195,7 +195,6 @@ class _HistoryListTileState extends State<HistoryListTile> {
*/ */
onTap: () { onTap: () {
store.dispatch(ClearEntityFilter());
if (state.prefState.isHistoryFloated) { if (state.prefState.isHistoryFloated) {
Navigator.pop(context); Navigator.pop(context);
} }
@ -212,9 +211,11 @@ class _HistoryListTileState extends State<HistoryListTile> {
break; break;
default: default:
viewEntityById( viewEntityById(
context: context, context: context,
entityId: history.id, entityId: history.id,
entityType: history.entityType); entityType: history.entityType,
ensureVisible: true,
);
} }
}, },
onLongPress: entity == null onLongPress: entity == null

View File

@ -723,7 +723,10 @@ class _EntityFilter extends StatelessWidget {
SizedBox(width: 4), SizedBox(width: 4),
IconButton( IconButton(
icon: Icon(Icons.clear), icon: Icon(Icons.clear),
onPressed: () => store.dispatch(ClearEntityFilter()), onPressed: () => store.dispatch(FilterByEntity(
entityId: uiState.filterEntityId,
entityType: uiState.filterEntityType,
)),
), ),
], ],
), ),