Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sub-albums sorting not being respected per album #2630

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

ildyria
Copy link
Member

@ildyria ildyria commented Oct 30, 2024

This thing has been plaguing us for a while.
Finally found the proper fix.

@ildyria ildyria added the Review: easy Easy review expected: probably just need a quick to go through. label Oct 30, 2024
*
* @codeCoverageIgnore
*/
public function exceptionTraceToText(\Exception $e): string
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used in the PR, but quite useful when debugging:

dd($var, Helpers::exceptionTraceToText(new Exception))

Will dump the value of $var in a 500 and followed by the trace of where the dump happened.
The front-end is already taking care of making it a nice visual :)

*/
public function getEffectiveAlbumSorting(): AlbumSortingCriterion
{
return $this->getAlbumSortingAttribute() ?? AlbumSortingCriterion::createDefault();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getAlbumSortingAttribute() is defined on line 448 of the same file.

@ildyria ildyria added the High Priority High priority issues label Oct 30, 2024
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 84.71%. Comparing base (6fc3e35) to head (c887007).
Report is 2 commits behind head on master.

Additional details and impacted files

app/Models/Album.php Outdated Show resolved Hide resolved
Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com>
@ildyria ildyria merged commit 863eafe into master Oct 30, 2024
49 checks passed
@ildyria ildyria deleted the fix-sub-album-sorting branch October 30, 2024 21:44
aSouchereau pushed a commit that referenced this pull request Nov 9, 2024
* fix sub-albums sorting not being respected per album

* Update app/Models/Album.php

Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com>

---------

Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority High priority issues Review: easy Easy review expected: probably just need a quick to go through.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants