Adjust UI

This commit is contained in:
Hillel Coren 2021-09-26 09:04:36 +03:00
parent 65265cdbf3
commit f37ecb513d
2 changed files with 15 additions and 5 deletions

View File

@ -407,11 +407,18 @@ void viewEntityById({
final uiState = store.state.uiState;
if (!state.prefState.isPreviewEnabled && !entityType.isSetting) {
editEntity(
context: navigatorKey.currentContext,
entity: state.getEntityMap(entityType)[entityId],
force: force,
);
final BaseEntity entity = state.getEntityMap(entityType)[entityId];
if (entityType.hasViewPage) {
viewEntitiesByType(
entityType: entity.entityType.relatedTypes.first,
filterEntity: entity);
} else {
editEntity(
context: navigatorKey.currentContext,
entity: entity,
force: force,
);
}
return;
}

View File

@ -528,6 +528,9 @@ Reducer<BuiltList<HistoryRecord>> historyReducer = combineReducers([
TypedReducer<BuiltList<HistoryRecord>, EditCredit>((historyList, action) =>
_addToHistory(historyList,
HistoryRecord(id: action.credit.id, entityType: EntityType.credit))),
TypedReducer<BuiltList<HistoryRecord>, FilterByEntity>(
(historyList, action) => _addToHistory(historyList,
HistoryRecord(id: action.entityId, entityType: action.entityType))),
]);
BuiltList<HistoryRecord> _addToHistory(