feat(settings): add child mode toggle to hide download/delete buttons#1615
Open
Thomas05000005 wants to merge 2 commits into
Open
feat(settings): add child mode toggle to hide download/delete buttons#1615Thomas05000005 wants to merge 2 commits into
Thomas05000005 wants to merge 2 commits into
Conversation
Adds a new toggle in Interaction Settings that, when enabled, hides the download and delete buttons across the app to prevent accidental changes. Closes finamp-app#559.
4 tasks
Thomas05000005
added a commit
to Thomas05000005/finamp
that referenced
this pull request
May 4, 2026
Avoids collision with finamp-app#1615 which also reserves HiveField 148 for enableChildMode. If finamp-app#1615 lands first, this branch will rebase cleanly; if this lands first, the other PR can update similarly.
Initial PR only hid the inline DownloadButton on Album/Artist/etc.
screens. Manual testing on Windows desktop revealed the same
download/delete actions were still reachable through:
- the per-item 3-dots context menus (5 menu entries: download,
delete-from-device, delete-from-server, lock-download, and the
adaptive wrapper that picks one of them)
- the navigation drawer's "Downloads" entry, which opens the full
download management screen
Each menu entry already had a Visibility/isVisible gate; I extended
those gates with !enableChildMode (using ref.watch in the build path
and FinampSettingsHelper.finampSettings.enableChildMode in the
isVisible getter, since the latter has no widget context). The drawer
got converted to a ConsumerWidget so it can read the same flag and
omit the Downloads list tile when child mode is on. Other drawer
entries (Playback History, Saved Queues, Logs, Settings) are kept,
since they don't expose any way to delete downloaded files.
Thomas05000005
marked this pull request as ready for review
May 8, 2026 14:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new "Enable child mode" toggle in Interaction Settings that hides every UI affordance for downloading or deleting items in the app. Originally requested by @yringler in #559: an offline-mode-friendly setting so kids using the app for playback can't accidentally delete the parent's downloaded library.
Closes #559
Implementation
Followed the "Adding a New Setting" guide in
CONTRIBUTING.md:lib/models/finamp_models.dart: newenableChildModefield onFinampSettings(@HiveField(148)) +DefaultSettings.enableChildMode = false.lib/services/finamp_settings_helper.dart: reset added toresetInteractionsSettings().lib/screens/interaction_settings_screen.dart: newEnableChildModeToggleplaced right afterShowDeleteFromServerOptionToggle(both are protective settings).lib/l10n/app_en.arb:enableChildModeTitle/enableChildModeSubtitle.finamp_models.g.dart,finamp_settings_helper.g.dart) regenerated viadart run build_runner build --delete-conflicting-outputs.To make sure the toggle covers the actual issue text ("the app just wouldn't show the ability to download or delete downloaded files anywhere"), I patched every entry point I could find while testing the build on Windows desktop:
DownloadButton(Album/Artist/Genre/Library tile):lib/components/AlbumScreen/download_button.dartreturnsSizedBox.shrink()when child mode is on.Visibility(visible: ...)gate inbuild()and anisVisiblegetter for theHideableMenuEntryinterface:lib/menus/components/menuEntries/download_menu_entry.dartlib/menus/components/menuEntries/delete_from_device_menu_entry.dartlib/menus/components/menuEntries/delete_from_server_menu_entry.dartlib/menus/components/menuEntries/lock_download_menu_entry.dartlib/menus/components/menuEntries/adaptive_download_lock_delete_menu_entry.dartlib/menus/music_screen_drawer.dartwas converted to aConsumerWidgetand the "Downloads"ListTileis conditionally rendered. Other entries (Playback History, Saved Queues, Logs, Settings) are kept - none of them expose a way to delete downloaded files.flutter analyzereturns 0 new errors. Code formatted withdart format.Question for reviewers - scope of "anywhere"
While testing I hit one ambiguity: the drawer's "Saved Queues" entry uses an
Icons.auto_deleteicon and the screen's tiles useTablerIcons.restore. Reading the code, that screen only restores past playback queues; it doesn't delete any downloaded file. So I left it visible in child mode. Happy to also gate it behindenableChildModeif you prefer the stricter interpretation - let me know.Test plan
Tested on Windows desktop (
flutter run -d windows) against a real Jellyfin server. With child mode on:enableChildMode = falseWith child mode off, every download/delete affordance reappears unchanged.
Code assistance
Used Claude (LLM) to scaffold the new setting following
CONTRIBUTING.md, to grep for every download/delete entry point after the first round of manual testing surfaced gaps in the initial fix, and to verify the screens that were left visible (Saved Queues) actually don't expose any download/delete action.