mirror of
https://github.com/spotiflacapp/SpotiFLAC-Mobile.git
synced 2026-06-01 03:15:17 +07:00
refactor: conditionally show lyrics settings only when embed lyrics is enabled
This commit is contained in:
parent
537bab69ab
commit
813ed79073
1 changed files with 70 additions and 70 deletions
|
|
@ -306,20 +306,19 @@ class _DownloadSettingsPageState extends ConsumerState<DownloadSettingsPage> {
|
|||
onChanged: (value) => ref
|
||||
.read(settingsProvider.notifier)
|
||||
.setEmbedLyrics(value),
|
||||
showDivider: settings.embedLyrics,
|
||||
),
|
||||
if (settings.embedLyrics) ...[
|
||||
SettingsItem(
|
||||
icon: Icons.lyrics_outlined,
|
||||
title: context.l10n.lyricsMode,
|
||||
subtitle: settings.embedLyrics
|
||||
? _getLyricsModeLabel(context, settings.lyricsMode)
|
||||
: context.l10n.extensionsDisabled,
|
||||
onTap: settings.embedLyrics
|
||||
? () => _showLyricsModePicker(
|
||||
subtitle:
|
||||
_getLyricsModeLabel(context, settings.lyricsMode),
|
||||
onTap: () => _showLyricsModePicker(
|
||||
context,
|
||||
ref,
|
||||
settings.lyricsMode,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
SettingsItem(
|
||||
icon: Icons.source_outlined,
|
||||
|
|
@ -381,6 +380,7 @@ class _DownloadSettingsPageState extends ConsumerState<DownloadSettingsPage> {
|
|||
showDivider: false,
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue