Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: show radio history list on queue overlay for radio #1077

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading