Skip to content

Commit

Permalink
AlbumsVC: fix recently added sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
BLeeEZ committed Dec 10, 2022
1 parent 6617832 commit 99956c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Amperfy/Screens/ViewController/AlbumsVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ class AlbumsVC: SingleFetchedResultsTableViewController<AlbumMO> {
appDelegate.userStatistics.visited(.albums)

applyFilter()
change(sortType: appDelegate.storage.settings.albumsSortSetting)
configureSearchController(placeholder: "Search in \"\(filterTitle)\"", scopeButtonTitles: ["All", "Cached"], showSearchBarAtEnter: false)
tableView.register(nibName: GenericTableCell.typeName)
tableView.rowHeight = GenericTableCell.rowHeight
Expand Down Expand Up @@ -91,7 +90,7 @@ class AlbumsVC: SingleFetchedResultsTableViewController<AlbumMO> {
self.sortType = sortType
singleFetchedResultsController?.clearResults()
tableView.reloadData()
fetchedResultsController = AlbumFetchedResultsController(coreDataCompanion: appDelegate.storage.main, sortType: sortType, isGroupedInAlphabeticSections: true)
fetchedResultsController = AlbumFetchedResultsController(coreDataCompanion: appDelegate.storage.main, sortType: sortType, isGroupedInAlphabeticSections: sortType != .recentlyAddedIndex)
fetchedResultsController.fetchResultsController.sectionIndexType = sortType.asSectionIndexType
singleFetchedResultsController = fetchedResultsController
tableView.reloadData()
Expand Down

0 comments on commit 99956c8

Please sign in to comment.