From d3cbcc41791c1e9db4ef55c4e6e0e392cb5dee2c Mon Sep 17 00:00:00 2001 From: Paul Woitaschek Date: Sat, 27 Dec 2025 20:24:07 +0100 Subject: [PATCH] Move folder picker to settings behind feature flag (#3280) * Refactor: Introduce a feature flag module Introduces a new `core:featureflag` module to abstract feature flag implementations. This module provides a `FeatureFlag` interface and a `FeatureFlagFactory` to create feature flags backed by `RemoteConfig`. Key changes include: - Creating a new `:core:featureflag` Gradle module. - Replacing direct `RemoteConfig` usage in `features/cover` and `features/review` with the new `FeatureFlag` abstraction. - Using a `MemoryFeatureFlag` for testing purposes. * Move folder picker to settings behind feature flag This change introduces a feature flag `folder_picker_in_settings`. When this flag is enabled: - The folder picker icon is removed from the book overview top bar. - A new entry to access the audiobook folder management screen is added to the settings menu. Additionally, feature flag definitions have been centralized into a single `FeatureFlagBindingContainer` for better organization. * Delete docs/feature-specs/folder_picker_in_settings.md --- .idea/inspectionProfiles/ktlint.xml | 1 + .../FeatureFlagBindingContainer.kt | 41 +++++++++++++++++++ .../core/featureflag/FeatureFlagFactory.kt | 7 +++- core/strings/src/main/res/values/strings.xml | 1 + features/bookOverview/build.gradle.kts | 1 + .../overview/BookOverviewViewModel.kt | 5 +++ .../overview/BookOverviewViewState.kt | 2 + .../bookOverview/views/BookOverview.kt | 1 + .../views/topbar/BookOverviewSearchBar.kt | 2 + .../views/topbar/BookOverviewTopBar.kt | 2 + .../views/topbar/TopBarTrailingIcon.kt | 5 ++- .../voice/features/cover/api/CoverModule.kt | 9 +--- features/folderPicker/build.gradle.kts | 1 + .../features/review/ShouldShowReviewDialog.kt | 1 + features/settings/build.gradle.kts | 2 +- .../features/settings/SettingsListener.kt | 2 + .../features/settings/SettingsViewModel.kt | 12 ++++++ .../features/settings/SettingsViewState.kt | 2 + .../voice/features/settings/views/Settings.kt | 20 +++++++++ 19 files changed, 105 insertions(+), 12 deletions(-) create mode 100644 core/featureflag/src/main/kotlin/voice/core/featureflag/FeatureFlagBindingContainer.kt diff --git a/.idea/inspectionProfiles/ktlint.xml b/.idea/inspectionProfiles/ktlint.xml index 87e170f75..75a5b63dd 100644 --- a/.idea/inspectionProfiles/ktlint.xml +++ b/.idea/inspectionProfiles/ktlint.xml @@ -73,5 +73,6 @@