Skip to content

Sorting by release date in descending order shows dates in ascending order (icon ↑ shown for descending, ↓ shown for ascending) #451

@Ryziii

Description

@Ryziii

Bug: When sorting items (audiobooks/episodes) by release date in descending order (newest first), the actual order displayed is ascending (oldest first).

Root cause: The chevron icon mapping for sort direction is inverted in ItemSortOrderPicker.icon(for:), which misleads users into selecting the wrong direction.

In App/Item/Picker/ItemSortOrderPicker.swift:28 (and two other locations):

// Current (wrong):
ascending ? "chevron.down" : "chevron.up"

Apple's convention is chevron.up = ascending (A→Z, oldest→newest), chevron.down = descending (Z→A, newest→oldest). Because the mapping is backwards, when ascending is false (descending), the UI shows chevron.up (↑). Users interpret ↑ as ascending, think the sort is oldest-first, and toggle — which actually switches to ascending, making dates oldest-first when they expect newest-first.

Affected files:

App/Item/Picker/ItemSortOrderPicker.swift:28
App/Panels/AudiobookTagsPanel.swift:52
App/Panels/AudiobookGenresPanel.swift:52

Fix:

ascending ? "chevron.up" : "chevron.down"

Note: The ascending Bool itself is used correctly everywhere else (API desc param, local sort logic, persistence) — only the icon mapping is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions