feat(17-01): add TrackMetadataChanged handler and remove selection gate on Track Details
- LibraryStore now listens for TrackMetadataChanged and invalidates all caches - Track Details context menu item visible for any right-clicked track in all 4 views - Removed selectionCount === 1 gate from track-list, queue-panel, cover-grid, playlist-details
This commit is contained in:
@@ -2049,9 +2049,7 @@ export class CoverGrid
|
||||
</wa-dropdown-item>
|
||||
${this.contextMenuTarget
|
||||
.kind ===
|
||||
'track' &&
|
||||
this.selectedTracks
|
||||
.size === 1
|
||||
'track'
|
||||
? html`
|
||||
<wa-dropdown-item
|
||||
@click=${() =>
|
||||
|
||||
@@ -1489,10 +1489,6 @@ export class PlaylistDetails
|
||||
? `Remove from ${this.favCtrl.playlistName}`
|
||||
: `Add to ${this.favCtrl.playlistName}`}
|
||||
</wa-dropdown-item>
|
||||
${this.selection
|
||||
.selectionCount ===
|
||||
1
|
||||
? html`
|
||||
<wa-dropdown-item
|
||||
@click=${() =>
|
||||
this.onContextMenuAction(
|
||||
@@ -1508,8 +1504,6 @@ export class PlaylistDetails
|
||||
Track
|
||||
Details
|
||||
</wa-dropdown-item>
|
||||
`
|
||||
: nothing}
|
||||
</div>
|
||||
`
|
||||
: nothing}
|
||||
|
||||
@@ -1549,9 +1549,6 @@ export class QueuePanel
|
||||
></wa-icon>
|
||||
${this.favCtrl.allFavorited(this.getSelectedFilePaths()) ? `Remove from ${this.favCtrl.playlistName}` : `Add to ${this.favCtrl.playlistName}`}
|
||||
</wa-dropdown-item>
|
||||
${this.selection
|
||||
.selectionCount === 1
|
||||
? html`
|
||||
<wa-dropdown-item
|
||||
@click=${() =>
|
||||
this.onContextMenuAction(
|
||||
@@ -1567,8 +1564,6 @@ export class QueuePanel
|
||||
Track
|
||||
Details
|
||||
</wa-dropdown-item>
|
||||
`
|
||||
: nothing}
|
||||
</div>
|
||||
`
|
||||
: nothing}
|
||||
|
||||
@@ -1963,8 +1963,6 @@ export class TrackList extends LitElement implements SelectionHost, ContextMenuH
|
||||
></wa-icon>
|
||||
${this.favCtrl.allFavorited(this.selection.getSelectedKeysOrdered()) ? `Remove from ${this.favCtrl.playlistName}` : `Add to ${this.favCtrl.playlistName}`}
|
||||
</wa-dropdown-item>
|
||||
${this.selection.selectionCount === 1
|
||||
? html`
|
||||
<wa-dropdown-item
|
||||
@click=${() =>
|
||||
this.onContextMenuAction(
|
||||
@@ -1979,8 +1977,6 @@ export class TrackList extends LitElement implements SelectionHost, ContextMenuH
|
||||
></wa-icon>
|
||||
Track Details
|
||||
</wa-dropdown-item>
|
||||
`
|
||||
: nothing}
|
||||
</div>
|
||||
`
|
||||
: nothing}
|
||||
|
||||
@@ -82,6 +82,9 @@ class LibraryStore {
|
||||
this.changeGen++;
|
||||
this.notify();
|
||||
});
|
||||
EventsOn(Events.TrackMetadataChanged, () => {
|
||||
this.invalidate();
|
||||
});
|
||||
|
||||
this.loadCoverSize();
|
||||
this.deferEagerFetch();
|
||||
|
||||
Reference in New Issue
Block a user