mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
feature: Add option to disable background images (#380)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
d10dfdd09d
commit
f2ed3d7f7e
6 changed files with 72 additions and 24 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import 'package:fladder/l10n/generated/app_localizations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:fladder/l10n/generated/app_localizations.dart';
|
||||
import 'package:fladder/providers/settings/client_settings_provider.dart';
|
||||
import 'package:fladder/screens/settings/settings_list_tile.dart';
|
||||
import 'package:fladder/screens/settings/widgets/settings_label_divider.dart';
|
||||
|
|
@ -80,12 +80,25 @@ List<Widget> buildClientSettingsVisual(
|
|||
),
|
||||
SettingsListTile(
|
||||
label: Text(context.localized.settingsEnableOsMediaControls),
|
||||
subLabel: Text(context.localized.settingsEnableOsMediaControlsDesc),
|
||||
onTap: () => ref.read(clientSettingsProvider.notifier).setMediaKeys(!clientSettings.enableMediaKeys),
|
||||
trailing: Switch(
|
||||
value: clientSettings.enableMediaKeys,
|
||||
onChanged: (value) => ref.read(clientSettingsProvider.notifier).setMediaKeys(value),
|
||||
),
|
||||
),
|
||||
SettingsListTile(
|
||||
label: Text(context.localized.enableBackgroundPostersTitle),
|
||||
subLabel: Text(context.localized.enableBackgroundPostersDesc),
|
||||
onTap: () => ref
|
||||
.read(clientSettingsProvider.notifier)
|
||||
.update((cb) => cb.copyWith(backgroundPosters: !clientSettings.backgroundPosters)),
|
||||
trailing: Switch(
|
||||
value: clientSettings.backgroundPosters,
|
||||
onChanged: (value) =>
|
||||
ref.read(clientSettingsProvider.notifier).update((cb) => cb.copyWith(backgroundPosters: value)),
|
||||
),
|
||||
),
|
||||
SettingsListTile(
|
||||
label: Text(context.localized.settingsNextUpCutoffDays),
|
||||
trailing: SizedBox(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue