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);
|
isEqualTo(entityId: record.id, entityType: record.entityType);
|
||||||
|
|
||||||
bool isEqualTo({EntityType entityType, String entityId}) =>
|
bool isEqualTo({EntityType entityType, String entityId}) =>
|
||||||
entityType == this.entityType && entityId == id;
|
entityType == this.entityType && (entityId ?? '') == (id ?? '');
|
||||||
|
|
||||||
static Serializer<HistoryRecord> get serializer => _$historyRecordSerializer;
|
static Serializer<HistoryRecord> get serializer => _$historyRecordSerializer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -308,11 +308,12 @@ class MainScreen extends StatelessWidget {
|
||||||
store.dispatch(ViewSettings(
|
store.dispatch(ViewSettings(
|
||||||
section: history.id,
|
section: history.id,
|
||||||
company: state.company,
|
company: state.company,
|
||||||
|
user: state.user,
|
||||||
tabIndex: 0,
|
tabIndex: 0,
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (history.id == null) {
|
if ((history.id ?? '').isEmpty) {
|
||||||
viewEntitiesByType(entityType: history.entityType);
|
viewEntitiesByType(entityType: history.entityType);
|
||||||
} else {
|
} else {
|
||||||
viewEntityById(
|
viewEntityById(
|
||||||
|
|
|
||||||
|
|
@ -128,11 +128,12 @@ class _MenuDrawerState extends State<MenuDrawer> {
|
||||||
store.dispatch(ViewSettings(
|
store.dispatch(ViewSettings(
|
||||||
section: history.id,
|
section: history.id,
|
||||||
company: state.company,
|
company: state.company,
|
||||||
|
user: state.user,
|
||||||
tabIndex: 0,
|
tabIndex: 0,
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (history.id == null) {
|
if ((history.id ?? '').isEmpty) {
|
||||||
viewEntitiesByType(
|
viewEntitiesByType(
|
||||||
entityType: history.entityType);
|
entityType: history.entityType);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue