Skip to content

Commit

Permalink
Apply and restore sort direction (#382)
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Daun <[email protected]>
  • Loading branch information
daun authored Nov 19, 2024
1 parent f2ad2f1 commit 9b69409
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Assets/AssetContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public function fillFromModel(Model $model)
->sourcePreset($model->settings['source_preset'] ?? null)
->warmPresets($model->settings['warm_presets'] ?? null)
->validationRules($model->settings['validation_rules'] ?? null)
->sortField($model->settings['sort_by'] ?? null)
->sortDirection($model->settings['sort_dir'] ?? null)
->model($model);

return $this;
Expand Down Expand Up @@ -81,6 +83,8 @@ public static function makeModelFromContract(AssetContainerContract $source)
'source_preset' => $source->sourcePreset,
'warm_presets' => $source->warmPresets,
'validation_rules' => $source->validationRules(),
'sort_by' => $source->sortField(),
'sort_dir' => $source->sortDirection(),
]);

// Set initial timestamps.
Expand Down

0 comments on commit 9b69409

Please sign in to comment.