fix(settings): name descending size sort explicitly
The library sort setting used `size` for largest-first sorting while the ascending option used `sizeAsc`. That made the pair asymmetric and left the current settings model carrying a legacy-looking key. Rename the current descending key to `sizeDesc` in the type, menu, and sort logic. Stored `size` values are normalized to `sizeDesc` on read, so existing users keep the same largest-first behavior while new writes use the explicit key. Test Plan: - deno task build - RUSTC_WRAPPER= CARGO_BUILD_RUSTC_WRAPPER= just build - git diff --check Refs: local review feedback
This commit is contained in:
@@ -5,7 +5,7 @@ import { GameSort } from '../../lib/types';
|
||||
|
||||
const OPTIONS: ReadonlyArray<{ key: GameSort; label: string }> = [
|
||||
{ key: 'az', label: 'Name (A–Z)' },
|
||||
{ key: 'size', label: 'Size (largest)' },
|
||||
{ key: 'sizeDesc', label: 'Size (largest)' },
|
||||
{ key: 'sizeAsc', label: 'Size (smallest)' },
|
||||
{ key: 'status', label: 'Status' },
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user