elements: sort the favorites by alphabetical order

This commit is contained in:
Stéphane Cerveau 2022-02-03 12:56:54 +01:00
parent 05aeb0caf4
commit 8059f73f51

View file

@ -99,7 +99,8 @@ pub fn setup_favorite_list(app: &GPSApp) {
}
pub fn add_to_favorite_list(app: &GPSApp, element_name: String) {
let favorites = Settings::get_favorites_list();
let mut favorites = Settings::get_favorites_list();
favorites.sort();
if !favorites.contains(&element_name) {
let favorite_list: TreeView = app
.builder