Zuletzt zeigt zuletzt Gehörtes statt neu Hinzugefügtes; Herz sitzt jetzt neben dem Songnamen

- MeloDb.watchRecentlyPlayed(): wertet PlaybackHistory statt dateAddedMs aus,
  ein mehrfach gehörter Song erscheint nur einmal, an der Position seines
  jüngsten Abspielens (Subquery mit GROUP BY songId / MAX(playedAtMs)).
- "Zuletzt" (Karte + RecentlyPlayedScreen, vormals RecentlyAddedScreen) in
  my_music_screen.dart nutzt jetzt watchRecentlyPlayed() statt watchRecent().
- Herz im Vollbild-Player: aus der AppBar-actions-Row entfernt, sitzt jetzt
  direkt neben dem Songtitel in _Angaben (now_playing_screen.dart).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012A2pmbnVNPiHdyf2GW8eLP
This commit is contained in:
Hermes (Server)
2026-08-29 11:24:42 +02:00
co-authored by Claude Sonnet 5
parent 90b63c467e
commit 2cabe36a6c
6 changed files with 345 additions and 32 deletions
+25 -23
View File
@@ -49,23 +49,14 @@ class NowPlayingScreen extends StatelessWidget {
// mit der fragte die App den Server nach einem Titel namens
// "https://…" und bekam nie einen Text.
final songId = songIdOf(item) ?? navidromeIdOf(item) ?? '';
return Row(
mainAxisSize: MainAxisSize.min,
children: [
IconButton(
tooltip: songId.isEmpty
? 'Kein Songtext für diesen Titel verfügbar'
: 'Songtext',
icon: const Icon(Icons.lyrics),
onPressed: songId.isEmpty
? null
: () => _showLyrics(context, songId),
),
// Ein Titel der Bibliothek wird lokal favorisiert, einer
// vom Server am Server — beide bekommen dasselbe Herz,
// statt dass eines davon ausgegraut bleibt.
_Herz(item: item),
],
return IconButton(
tooltip: songId.isEmpty
? 'Kein Songtext für diesen Titel verfügbar'
: 'Songtext',
icon: const Icon(Icons.lyrics),
onPressed: songId.isEmpty
? null
: () => _showLyrics(context, songId),
);
},
),
@@ -240,12 +231,23 @@ class _Angaben extends StatelessWidget {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
item.title,
style: Theme.of(context).textTheme.headlineSmall,
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Text(
item.title,
style: Theme.of(context).textTheme.headlineSmall,
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
),
),
// Ein Titel der Bibliothek wird lokal favorisiert, einer
// vom Server am Server — beide bekommen dasselbe Herz,
// statt dass eines davon ausgegraut bleibt.
_Herz(item: item),
],
),
const SizedBox(height: MeloSpace.sm),
Text(