Skip to content

Fix song unselected when played/paused - #224

Closed
rivaldi8 wants to merge 1 commit into
timusus:mainfrom
rivaldi8:fix/alexm-song-unselected-on-play-pause
Closed

rivaldi8 wants to merge 1 commit into
timusus:mainfrom
rivaldi8:fix/alexm-song-unselected-on-play-pause

Conversation

@rivaldi8

@rivaldi8 rivaldi8 commented May 4, 2026

Copy link
Copy Markdown
Contributor

Steps to reproduce:

  1. Go to the Songs tab.
  2. Start playing a song by clicking it.
  3. Select it by long clicking it.
  4. Select another song.
  5. Click pause.

Expected:
The song pauses and remains selected.

Actual:
The song pauses and is unselected, although the selection count still shows 2 songs selected.

Steps to reproduce:
1. Go to the Songs tab.
1. Start playing a song by clicking it.
2. Select it by long clicking it.
3. Select another song.
4. Click pause.

Expected:
The song pauses and remains selected.

Actual:
The song pauses and is unselected, although the selection count still
shows 2 songs selected.
timusus pushed a commit that referenced this pull request Sep 24, 2026
SongListViewModel keyed selection by the full Song data class, whose
equals() includes playCount and lastPlayed. Playing or pausing a
selected song mutates those fields and re-emits it from the
repository, so the selection lookup by equality silently failed. Key
selection by Song.id instead, which is stable across playback state
changes.

Changelog: A song no longer loses its selection mark in the Songs list when it starts or stops playing
@timusus

timusus commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Landed on main as 632a567 (ported onto current main with fixups). A follow-up in 9c682326 fixes the contextual toolbar, which off-screen library tabs were hiding (#344). Verified by unit tests plus the full emulator suite, which now carries a check for this change. Thanks @alexmgraca!

@timusus timusus closed this Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants