Other crap i added months ago

This commit is contained in:
2025-03-11 21:35:12 +02:00
parent ad89b0c64d
commit 67a948bb66
10 changed files with 197 additions and 56 deletions

View File

@@ -1,5 +1,5 @@
use egui::{CursorIcon, RichText, Sense, TextBuffer};
use xmpd_manifest::store::BaseStore;
use xmpd_manifest::store::{BaseStore, StoreExtras};
use crate::utils::SearchType;
use super::{CompGetter, CompUi};
@@ -23,12 +23,7 @@ impl CompUi for LeftNav {
ui.vertical(|ui| {
let len = state.manifest.store().get_songs().len();
add_playlist_tab(ui, &None, "All Songs", None, len, w);
let mut playlists: Vec<_> = state.manifest.store().get_playlists().into_iter().collect();
playlists.sort_by(|a, b| {
let a = a.1.name().to_lowercase();
let b = b.1.name().to_lowercase();
a.cmp(&b)
});
let playlists = state.manifest.store().get_playlists_sorted();
let search_text = handle_error_ui!(header::Header::get()).search_text.clone();
let (qtyp, qtxt) = crate::utils::SearchType::from_str(&search_text);
for (pid, playlist) in playlists.iter() {