fix(12-02): wait for scan to stop before library removal, surface errors in UI
RemoveLibrary now polls until the cancelled scan goroutine finishes before proceeding with the removal transaction. Also show removal errors as toast messages instead of only logging to console, and explicitly reload library list after successful removal.
This commit is contained in:
@@ -1396,9 +1396,13 @@ export class ConfigPage extends LitElement {
|
||||
this.showToast(
|
||||
`Removed '${libName}' (${summary?.tracksDeleted ?? 0} tracks deleted)`,
|
||||
);
|
||||
void this.loadLibraries();
|
||||
} catch (err) {
|
||||
this.isRemoving = false;
|
||||
this.removingLibraryId = null;
|
||||
this.removalImpact = null;
|
||||
console.error('Failed to remove library:', err);
|
||||
this.showToast(`Failed to remove '${libName}': ${String(err)}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user