Skip to content

Commit 32541e1

Browse files
committed
desktop-app: Add track search memo for incremental updates
1 parent abfbd8c commit 32541e1

File tree

6 files changed

+208
-108
lines changed

6 files changed

+208
-108
lines changed

Cargo.lock

+18-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/core-json/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ url = { version = "2.5.0", features = ["serde"] }
2424

2525
# JSON Schema (optional)
2626
schemars = { version = "0.8.16", optional = true, features = ["chrono", "url"] }
27-
chrono = { version = "0.4.33", optional = true, default-features = false }
27+
chrono = { version = "0.4.34", optional = true, default-features = false }
2828

2929
# Workspace dependencies
3030
aoide-core = { version = "=0.8.0", path = "../core", features = ["serde"] }

crates/desktop-app/src/collection/mod.rs

+14-13
Original file line numberDiff line numberDiff line change
@@ -312,17 +312,6 @@ impl State {
312312
matches!(self, State::Ready { .. })
313313
}
314314

315-
pub fn reset(&mut self) -> bool {
316-
if matches!(self, Self::Void) {
317-
// No effect
318-
return false;
319-
}
320-
let reset = Self::Void;
321-
log::debug!("Resetting state: {self:?} -> {reset:?}");
322-
*self = reset;
323-
true
324-
}
325-
326315
#[must_use]
327316
pub fn music_dir(&self) -> Option<DirPath<'_>> {
328317
match self {
@@ -412,7 +401,18 @@ impl State {
412401
}
413402
}
414403

415-
pub fn update_music_dir(
404+
fn reset(&mut self) -> bool {
405+
if matches!(self, Self::Void) {
406+
// No effect
407+
return false;
408+
}
409+
let reset = Self::Void;
410+
log::debug!("Resetting state: {self:?} -> {reset:?}");
411+
*self = reset;
412+
true
413+
}
414+
415+
fn update_music_dir(
416416
&mut self,
417417
new_kind: Option<Cow<'_, str>>,
418418
new_music_dir: DirPath<'_>,
@@ -520,7 +520,8 @@ impl State {
520520
Some(params)
521521
}
522522

523-
pub fn synchronize(&mut self) -> bool {
523+
#[allow(dead_code)] // FIXME: Reconnect to `synchronize_vfs()`
524+
fn synchronize(&mut self) -> bool {
524525
let old_self = std::mem::replace(self, Self::Void);
525526
let Self::Ready { entity, .. } = old_self else {
526527
log::warn!("Illegal state for synchronizing: {old_self:?}");

0 commit comments

Comments
 (0)