Merge pull request 'v2026.05.19.2 — hotfix: restore media notification (remove broken custom favorite)' (#55) from dev into main
Merge v2026.05.19.2 hotfix — restore media notification (PR #55)
This commit was merged in pull request #55.
This commit is contained in:
@@ -724,31 +724,18 @@ class MinstrelAudioHandler extends BaseAudioHandler with QueueHandler, SeekHandl
|
|||||||
// with up-to-date shuffleMode/repeatMode fields.
|
// with up-to-date shuffleMode/repeatMode fields.
|
||||||
void _broadcastState(PlaybackEvent? event) {
|
void _broadcastState(PlaybackEvent? event) {
|
||||||
final playing = _player.playing;
|
final playing = _player.playing;
|
||||||
// Favorite control: only when a track is playing and the LikeBridge
|
// No custom favorite MediaControl here. audio_service builds a
|
||||||
// is wired. Icon/label toggle by current like state; tapping it
|
// PlaybackStateCompat.CustomAction for it and throws
|
||||||
// routes to customAction('minstrel.favorite'). Implemented as a
|
// "You must specify an icon resource id to build a CustomAction"
|
||||||
// MediaControl.custom (NOT setRating — that path is broken upstream,
|
// on real builds (the androidIcon doesn't resolve to a usable id),
|
||||||
// audio_service #376, and regressed the Pixel Watch). Kept out of
|
// and that exception aborts the ENTIRE media notification — no
|
||||||
// androidCompactActionIndices so the compact/lock view is unchanged.
|
// tray or Wear controls at all. Removed; like/favorite remains
|
||||||
final favTrackId = mediaItem.value?.id;
|
// available in-app and via the standard lock-screen surface.
|
||||||
final favBridge = _likeBridge;
|
|
||||||
final showFav = favTrackId != null && favBridge != null;
|
|
||||||
final favLiked = favTrackId != null &&
|
|
||||||
favBridge != null &&
|
|
||||||
favBridge.isTrackLiked(favTrackId);
|
|
||||||
playbackState.add(PlaybackState(
|
playbackState.add(PlaybackState(
|
||||||
controls: [
|
controls: [
|
||||||
MediaControl.skipToPrevious,
|
MediaControl.skipToPrevious,
|
||||||
if (playing) MediaControl.pause else MediaControl.play,
|
if (playing) MediaControl.pause else MediaControl.play,
|
||||||
MediaControl.skipToNext,
|
MediaControl.skipToNext,
|
||||||
if (showFav)
|
|
||||||
MediaControl.custom(
|
|
||||||
androidIcon: favLiked
|
|
||||||
? 'drawable/ic_stat_favorite'
|
|
||||||
: 'drawable/ic_stat_favorite_border',
|
|
||||||
label: favLiked ? 'Unfavorite' : 'Favorite',
|
|
||||||
name: 'minstrel.favorite',
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
// androidCompactActionIndices tells the system which controls
|
// androidCompactActionIndices tells the system which controls
|
||||||
// appear in the collapsed/lock-screen view. Without this, some
|
// appear in the collapsed/lock-screen view. Without this, some
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: minstrel
|
name: minstrel
|
||||||
description: Minstrel mobile client
|
description: Minstrel mobile client
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 2026.5.19+11
|
version: 2026.5.19+12
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.5.0 <4.0.0'
|
sdk: '>=3.5.0 <4.0.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user