Skip to content

Commit

Permalink
fix: show radio history list on queue overlay for radio (#1077)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feichtmeier authored Dec 3, 2024
1 parent 6c74a2a commit 42beb39
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
32 changes: 18 additions & 14 deletions lib/player/view/full_height_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,28 @@ class FullHeightPlayer extends StatelessWidget with WatchItMixin {
playerPosition: playerPosition,
);
} else {
final queueOrHistory = audio?.audioType == AudioType.radio
? const SizedBox(
width: 400,
height: 500,
child: RadioHistoryList(
simpleList: true,
),
)
: QueueBody(
selectedColor: theme.colorScheme.onSurface,
);
final column = Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
if (showQueue && !playerWithSidePanel)
const Padding(
padding: EdgeInsets.only(bottom: 2 * kLargestSpace),
child: QueueBody(),
Padding(
padding: const EdgeInsets.only(
bottom: 2 * kLargestSpace,
top: kLargestSpace,
),
child: queueOrHistory,
)
else ...[
if (!isMobilePlatform || context.isPortrait)
Expand Down Expand Up @@ -94,17 +108,7 @@ class FullHeightPlayer extends StatelessWidget with WatchItMixin {
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(width: 490, child: column),
audio?.audioType == AudioType.radio
? const SizedBox(
width: 400,
height: 500,
child: RadioHistoryList(
simpleList: true,
),
)
: QueueBody(
selectedColor: theme.colorScheme.onSurface,
),
queueOrHistory,
],
)
: column,
Expand Down
6 changes: 5 additions & 1 deletion lib/player/view/queue_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:watch_it/watch_it.dart';

import '../../app/app_model.dart';
import '../../common/data/audio.dart';
import '../../common/data/audio_type.dart';
import '../../common/view/icons.dart';
import '../../common/view/modals.dart';
import '../../common/view/ui_constants.dart';
Expand All @@ -24,13 +25,16 @@ class QueueButton extends StatelessWidget with WatchItMixin {
final theme = context.theme;
final playerToTheRight = context.mediaQuerySize.width > kSideBarThreshHold;
final isFullScreen = watchPropertyValue((AppModel m) => m.fullWindowMode);
final radio = watchPropertyValue(
(PlayerModel m) => m.audio?.audioType == AudioType.radio,
);

return IconButton(
isSelected:
isSelected ?? watchPropertyValue((AppModel m) => m.showQueueOverlay),
color: color ?? theme.colorScheme.onSurface,
padding: EdgeInsets.zero,
tooltip: context.l10n.queue,
tooltip: radio ? context.l10n.hearingHistory : context.l10n.queue,
icon: Icon(
Iconz.playlist,
color: color ?? theme.colorScheme.onSurface,
Expand Down

0 comments on commit 42beb39

Please sign in to comment.