mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2025-12-24 20:09:30 +00:00
feat: Add settings to control play button visibility on home shelves
This commit introduces new functionality to customize the visibility of the
play button on home page shelves.
Key changes:
- Added `HomePageSettings` to `AppSettings` to store your preferences:
- `showPlayButtonOnContinueShelves`: Controls visibility on "Continue Listening" and "Continue Series" shelves (default: true).
- `showPlayButtonOnAllShelves`: Controls visibility on other shelves (default: false).
- Modified `BookHomeShelf` to respect these settings when rendering books.
- Created a new "Home Page Settings" page under "Appearance" in App Settings, allowing you to toggle these two options.
- Added comprehensive unit and widget tests to cover the new settings model, the conditional logic in `BookHomeShelf`, and the functionality of the new settings page.
This commit is contained in:
parent
23e5d73bea
commit
cc9a94de62
9 changed files with 457 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ import 'package:vaani/settings/view/notification_settings_page.dart';
|
|||
import 'package:vaani/settings/view/player_settings_page.dart';
|
||||
import 'package:vaani/settings/view/shake_detector_settings_page.dart';
|
||||
import 'package:vaani/settings/view/theme_settings_page.dart';
|
||||
import 'package:vaani/settings/view/home_page_settings_page.dart';
|
||||
|
||||
import 'scaffold_with_nav_bar.dart';
|
||||
import 'transitions/slide.dart';
|
||||
|
|
@ -213,6 +214,13 @@ class MyAppRouter {
|
|||
const ShakeDetectorSettingsPage(),
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
path: Routes.homePageSettings.pathName,
|
||||
name: Routes.homePageSettings.name,
|
||||
pageBuilder: defaultPageBuilder(
|
||||
const HomePageSettingsPage(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
GoRoute(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue