Fix for back button
This commit is contained in:
parent
08df377ddb
commit
530091c37b
|
|
@ -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<HistoryRecord> get serializer => _$historyRecordSerializer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -128,11 +128,12 @@ class _MenuDrawerState extends State<MenuDrawer> {
|
|||
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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue