diff --git a/lib/redux/ui/pref_state.dart b/lib/redux/ui/pref_state.dart index 6435f8f43..b71da0a43 100644 --- a/lib/redux/ui/pref_state.dart +++ b/lib/redux/ui/pref_state.dart @@ -421,7 +421,7 @@ abstract class HistoryRecord isEqualTo(entityId: record.id, entityType: record.entityType); bool isEqualTo({EntityType entityType, String entityId}) => - entityType == this.entityType && entityId == id; + entityType == this.entityType && (entityId ?? '') == (id ?? ''); static Serializer get serializer => _$historyRecordSerializer; } diff --git a/lib/ui/app/main_screen.dart b/lib/ui/app/main_screen.dart index c51c43625..93c917859 100644 --- a/lib/ui/app/main_screen.dart +++ b/lib/ui/app/main_screen.dart @@ -308,11 +308,12 @@ class MainScreen extends StatelessWidget { store.dispatch(ViewSettings( section: history.id, company: state.company, + user: state.user, tabIndex: 0, )); break; default: - if (history.id == null) { + if ((history.id ?? '').isEmpty) { viewEntitiesByType(entityType: history.entityType); } else { viewEntityById( diff --git a/lib/ui/app/menu_drawer.dart b/lib/ui/app/menu_drawer.dart index 5bb4551fa..4f8e05b2a 100644 --- a/lib/ui/app/menu_drawer.dart +++ b/lib/ui/app/menu_drawer.dart @@ -128,11 +128,12 @@ class _MenuDrawerState extends State { store.dispatch(ViewSettings( section: history.id, company: state.company, + user: state.user, tabIndex: 0, )); break; default: - if (history.id == null) { + if ((history.id ?? '').isEmpty) { viewEntitiesByType( entityType: history.entityType); } else {