Skip to content

Commit 244258b

Browse files
committed
gui: Ignore leading articles when sorting destinations
1 parent ec10dae commit 244258b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
6969
- Enabled fast math for `glam`
7070
- Various atmosphere-related improvements
7171
- Updated `destiny-pkg` to 0.14, drastically improving startup time
72+
- Leading articles are now ignored when sorting destinations
7273

7374
### Fixed
7475

crates/alkahest/src/gui/activity_select.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,13 @@ impl ActivityBrowser {
146146
}
147147

148148
let mut maps: Vec<_> = maps.into_iter().collect();
149-
maps.sort_by(|a, b| a.0.cmp(&b.0));
149+
maps.sort_by_key(|(name, _)| name.clone());
150150

151151
let mut activity_buckets: Vec<_> = activity_buckets.into_iter().collect();
152-
activity_buckets.sort_by(|a, b| a.0.cmp(&b.0));
152+
activity_buckets.sort_by_key(|(name, _)| {
153+
let name_trimmed = name.trim_start_matches("The ");
154+
name_trimmed.to_owned()
155+
});
153156

154157
Self {
155158
// destinations,

0 commit comments

Comments
 (0)