mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
fix(device-sync): auto-import manifest on mount, clear view on disconnect
- Read psysonic-sync.json automatically when DeviceSync page opens and drive is already connected (no manual folder re-select needed) - Always replace sources from manifest when choosing a folder, so switching between sticks loads the correct album list - Hide source list and status badges when drive is disconnected - Reset import flag on disconnect so re-plugging triggers a fresh import - Fix unused `mut` warning in cancel_device_sync Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1896,7 +1896,7 @@ async fn calculate_sync_payload(
|
||||
/// Signals a running `sync_batch_to_device` job to stop after its current tracks finish.
|
||||
#[tauri::command]
|
||||
fn cancel_device_sync(job_id: String, app: tauri::AppHandle) {
|
||||
if let Ok(mut flags) = sync_cancel_flags().lock() {
|
||||
if let Ok(flags) = sync_cancel_flags().lock() {
|
||||
if let Some(flag) = flags.get(&job_id) {
|
||||
flag.store(true, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user