These 36 commits are when the Protocol Buffers files have changed:
| Commit: | 4776400 | |
|---|---|---|
| Author: | jacobrein | |
feat(datastore): add downloadPath field to MangaSettings proto
| Commit: | c1bbc53 | |
|---|---|---|
| Author: | jacobrein | |
Feat: Implement advanced blur system and update dependencies This commit introduces a sophisticated blur management system supporting both Haze and a new "Liquid Glass" effect. It also includes a major update to project dependencies, increments the Android compile SDK version, and refactors several components for better multiplatform compatibility. - **New Blur System**: - Introduced `BlurKindState` and associated modifiers (`setBlurKind`, `setBlurKindSource`, `floatingActionButtonBlurKind`) to dynamically switch between Haze and Liquid Glass effects. - Added `BlurKindLiquidGlass.kt` leveraging the `backdrop` library for advanced refraction and chromatic aberration effects. - Added `BlurKindHaze.kt` and `HazeExtensions.kt` to streamline Haze style configurations. - Updated `settings.proto` and `SettingsHandling.kt` to persist new blur preferences, including blur type, amount, and refraction settings. - **Dependency Updates & Build Configuration**: - **`gradle/libs.versions.toml`**: - Upgraded Kotlin to `2.3.20` and KSP to `2.3.6`. - Upgraded Compose Multiplatform to `1.11.0-beta03`. - Updated various libraries: `anthropicSdkKotlin` (`0.29.0`), `coil` (`3.4.0`), `koin` (`4.2.1`), `haze` (`1.7.2`), and `ktor` (`3.4.2`). - Added `backdrop` (`2.0.0-alpha03`). - **`build.gradle.kts`**: Updated plugin versions and commented out `ProjectInfo` plugin. - **`settings.gradle.kts`**: Updated `androidx` catalog to `2026.04.00` and added R8/Sonatype snapshot repositories. - **`gradle.properties`**: Increased JVM heap size to `8g` and added several Android build feature flags. - **`AppInfo.kt`**: Incremented `compileVersion` to `37`. - **Refactoring & KMP Improvements**: - **HeatMap Refactor**: Abstracted the `HeatMap` implementation into `HeatMapWrapper` with platform-specific implementations (Android/JVM) and a shared `KmpHeat` model to improve multiplatform support. - **Module Configuration**: Migrated `androidLibrary` blocks to the `android` block within KMP modules for consistency with modern Gradle patterns. - **Navigation**: Updated `Nav3View.kt` to use the `sceneStrategies` list in `NavDisplay` and simplified scope access. - **UI & UX Enhancements**: - **Notifications**: Added a "Cancel" action to the `UpdateChecker` foreground notification using `WorkManager.createCancelPendingIntent`. - **TV UI**: Refactored `CardPresenter.kt` and `FavoriteFragment.kt` for better null safety during view binding. - **File Handling**: Updated `FileKit` usage in `ExtensionListScreen.kt`, `OtakuListView.kt`, and others to include default dialog settings. - **Resources**: Added `app_name` ("OtakuWorld") to `strings.xml`. - **Bug Fixes**: - Fixed return type nullability in `ExampleUnitTest.kt` for `socketFactory()`. - Resolved context nullability issues in `CustomImageCardView.kt`.
| Commit: | b352426 | |
|---|---|---|
| Author: | jacobrein | |
Refactor: Remove protobuf and migrate settings handling This commit removes the protobuf-based settings implementation and migrates existing settings to a new DataStore-based solution. The old `SettingsHandling` and `MangaSettingsHandling` classes, along with their associated proto files and migration logic, have been deleted. - **Dependency Updates**: - Updated various dependencies including KSP, Room, Navigation, Compose BOM, Ktor, SQLite, and KotlinTest to newer versions. - Updated AndroidX version catalog in `settings.gradle.kts`. - **Protobuf Removal**: - Removed the `otaku-protobuf` plugin from `mangaworld/build.gradle.kts` and `UIViews/build.gradle.kts`. - Deleted `manga_settings.proto` from `mangaworld/src/main/proto/`. - Deleted `settings.proto` from `UIViews/src/main/proto/`. - **Settings Handling Removal**: - Deleted `MangaSettings.kt` from `mangaworld/src/main/java/com/programmersbox/mangaworld/`. This file contained `MangaSettingsHandling`, `MangaSettingsSerializer`, and the `migrateMangaSettings` function. - Deleted `SettingsHandling.kt` from `UIViews/src/main/java/com/programmersbox/uiviews/datastore/`. This file contained `SettingsHandling`, `SettingsSerializer`, `ProtoStoreHandler`, `rememberPreference` extension, and the `migrateSettings` function. - **Code Cleanup**: - Removed instantiation and usage of the deleted settings handling classes from: - `MangaApp.kt` (`mangaworld`): Removed `MangaSettingsHandling` injection and migration call. - `GenericManga.kt` (`mangaworld`): Removed `MangaSettingsHandling` from Koin module. - `MockData.kt` (`UIViews`): Removed `SettingsHandling` from Koin module. - `RemoteConfigKeys.kt` (`UIViews`): Removed `settingsHandling` parameter from `setDataStoreValue`. - `AppModule.kt` (`UIViews`): Removed `SettingsHandling` from Koin module. - `OtakuApp.kt` (`UIViews`): Removed `settingsHandling` parameter from `remoteConfigSetup` and its usage in migration. - `app/build.gradle.kts`: Commented out `implementation("androidx.compose.material3:material3:1.5.0-alpha04")`. - `UIViews/build.gradle.kts`: Removed `ksp(libs.roomCompiler)`. - **Navigation Refactor (`app/src/main/java/com/programmersbox/otakuworld/MainActivity.kt`)**: - Removed an unused `Navigation()` composable. - Renamed `Navigation2()` to `Navigation()` and made its `modifier` parameter default to `Modifier`. - `MainActivity` now directly calls `InfoScreen()` instead of the removed `Navigation()` or `InfoScreen2()`. - **InfoScreen Refactor (`app/src/main/java/com/programmersbox/otakuworld/info/InfoScreen.kt`)**: - Removed the `InfoScreen()` composable (the older version) and `OtakuItemScreen()` private composable. - Renamed `InfoScreen2()` to `InfoScreen()`. - `SideEffect` in `PermissionGetter` now launches the permission request. - Removed `BackHandler` calls from `FavoritesScreen` and `ListsScreen` as navigation is handled by the `Navigation` composable. - Simplified tab state management in `InfoScreen` by directly using `App.ordinal`. - `Navigation` composable is now used within `InfoScreen` and its padding is applied to the navigation content. - **KMPUIView (`kmpuiviews/build.gradle.kts`)**: - Commented out `androidx.navigationevent` and `androidx.navigationevent.compose` dependencies. - Ensured `androidx.navigation3.runtime` is present.
The documentation is generated from this commit.
| Commit: | d62163c | |
|---|---|---|
| Author: | jacobrein | |
Refactor: Update ExtensionLoader and ExtensionListViewModel This commit updates the `ExtensionLoader` to use `coroutineScope` for loading extensions and modifies `ExtensionListViewModel` to use `blockingLoad` for refreshing and after uninstallation. - **`sharedutils/kmpextensionloader/src/androidMain/kotlin/com/programmersbox/kmpextensionloader/ExtensionLoader.kt`**: - Modified `loadExtensionsBlocking` to use `coroutineScope` instead of `runBlocking` for managing coroutines when loading extensions. This ensures that the suspending function correctly inherits its context from the calling scope. - **`kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/settings/extensions/ExtensionListViewModel.kt`**: - Changed `sourceLoader.load()` to `sourceLoader.blockingLoad()` in the `uninstall` function to ensure extensions are reloaded synchronously after an uninstallation. - Updated `refreshExtensions` to call `sourceLoader.blockingLoad()` within `viewModelScope.launch` for refreshing the extension list. - **`datastore/src/commonMain/proto/settings.proto`**: - Minor formatting change: Added a space before `DetailsChapterSwipeBehaviorHandle detailsChapterSwipeBehavior = 27;`.
| Commit: | c622efa | |
|---|---|---|
| Author: | jacobrein | |
Refactor: Implement Swipe Actions for Chapters in Details Screen This commit introduces swipe-to-action functionality for chapters in the details screen, allowing users to perform actions like "Mark as Read" or "Read" by swiping chapter items. It also adds corresponding settings to configure these swipe behaviors. - **`datastore/src/commonMain/proto/settings.proto`**: - Added `DetailsChapterSwipeBehaviorHandle` message to hold separate behaviors for start-to-end and end-to-start swipes. - Added `DetailsChapterSwipeBehavior` enum with values `Nothing`, `MarkAsRead`, and `Read`. - Integrated `DetailsChapterSwipeBehaviorHandle` into the main `Settings` message. - **`datastore/src/commonMain/kotlin/com/programmersbox/datastore/SettingsHandling.kt`**: - Added `defaultDetailsChapterSwipeBehavior` with `Read` for end-to-start and `MarkAsRead` for start-to-end swipes. - Included `detailsChapterSwipeBehavior` in `SettingsSerializer` default settings. - Added a `ProtoStoreHandler` for `detailsChapterSwipeBehavior` in `NewSettingsHandling`. - **`kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/details/DetailsScreen.kt`**: - Wrapped chapter items with `SwipeToDismissBox`. - Implemented swipe actions based on `DetailsChapterSwipeBehavior` settings from `NewSettingsHandling`. - Added visual feedback (icons and scaling animation) for swipe actions in the `backgroundContent` of `SwipeToDismissBox`. - Ensured that marking a chapter as read or navigating to read it updates its read status. - **`kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/details/DetailsPortrait.kt`**: - Added `Modifier.animateItem()` to the `ChapterListItem` within the lazy list for smoother item animations. - **`kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/settings/general/GeneralSettings.kt`**: - Added a new `DetailsChapterSwipeBehaviorSettings` composable. - This new settings group allows users to configure the swipe behavior for "Start to End" and "End to Start" actions on chapter items in the details screen. - Used `ListSetting` for users to choose from `DetailsChapterSwipeBehavior.Nothing`, `DetailsChapterSwipeBehavior.MarkAsRead`, or `DetailsChapterSwipeBehavior.Read`. - Included icons (`SwipeRight`, `SwipeLeft`) for visual clarity in the settings. - **`kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/settings/SettingScreen.kt`**: - Removed commented-out code related to "Gemini Recommendations" as it was marked as a TODO for future implementation.
| Commit: | f2c7c88 | |
|---|---|---|
| Author: | jacobrein | |
Feat: Add Color Blindness Correction Filter This commit introduces a color blindness correction filter that can be applied to images throughout the app. Users can select from Protanopia, Deuteranopia, or Tritanopia, or choose to have no filter. - **`datastore/src/commonMain/proto/settings.proto`**: - Added `ColorBlindnessType` enum to `UserSettings` protobuf definition with options for `None`, `Protanopia`, `Deuteranopia`, and `Tritanopia`. - **`datastore/src/commonMain/kotlin/com/programmersbox/datastore/SettingsHandling.kt`**: - Added `rememberColorBlindType` Composable function to `NewSettingsHandling` for observing and updating the color blindness preference. - **`kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/components/CoverCard.kt`**: - Added `colorFilterBlind` function that returns a `ColorFilter` based on the selected `ColorBlindnessType`. - Integrated the `colorFilter` parameter into various `CoverCard` Composables to apply the filter. - **`kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/settings/general/GeneralSettings.kt`**: - Added `ColorBlindTypeSettings` Composable to allow users to select their color blindness type. This setting is now available in the general settings screen. - **`kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/onboarding/composables/ThemeContent.kt`**: - Added `ColorBlindTypeSettings` to the theme onboarding screen. - **`kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/onboarding/composables/GeneralContent.kt`**: - Added `ColorBlindTypeSettings` to the general onboarding screen. - **Image Loading and Display**: - Updated various image loading and display Composables across different modules (`ImageLoaderChoice`, `DetailsHeader`, `QrCode`, `GradientImage`, `OptionsSheet`, `OtakuListDetailScreen`, `NotificationScreen`, `FavoriteScreen`, `HistoryScreen`) to accept and apply the `colorFilter`. - **`mangaworld/shared/src/commonMain/kotlin/com/programmersbox/manga/shared/reader/Pages.kt`** and **`mangaworld/shared/src/commonMain/kotlin/com/programmersbox/manga/shared/reader/ReaderComposeImage.kt`**: - Integrated the `colorFilter` into the reader components for image display. - **`mangaworld/src/main/java/com/programmersbox/mangaworld/GenericManga.kt`**: - Applied the `colorFilter` to the lazy grid items displaying manga covers.
| Commit: | 07f48f7 | |
|---|---|---|
| Author: | jacobrein | |
feat: Integrate Anthropic AI for Recommendations and Update UI This commit introduces Anthropic as a new AI provider for generating recommendations, refines the Recommendation screen UI, and updates the Account Info screen to display saved recommendation counts. - **Anthropic AI Integration:** - `datastore/src/commonMain/proto/settings.proto`: - Added `AnthropicSettings` message with `apiKey` and `modelName`. - Added `Anthropic` to the `AiService` enum. - `datastore/src/commonMain/kotlin/com/programmersbox/datastore/SettingsHandling.kt`: - Updated default `AiSettings` to include `anthropicSettings` with default values ("claude-2" model). - `kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/recommendations/aiproviders/AnthropicProvider.kt`: - Created a new `AnthropicProvider` implementing `AiRecommendationHandler`. - Initializes the Anthropic client using API key and model name from `NewSettingsHandling`. - Implements `getResult` to call the Anthropic API with the system prompt and user prompt. - `kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/di/AiModule.kt`: - Added `AnthropicProvider` to the Koin module, named with `AiService.Anthropic.name`. - Refactored AI provider factory registration using a new inline function `aiOf`. - `kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/recommendations/AiSettings.kt`: - Added UI for configuring `AnthropicSettings` within the AI settings screen. - Includes an API key field and a dropdown for selecting Anthropic models (e.g., `Model.entries`). - Fixed a bug in `ApiKeyField` where `onModify` was called with `currentKey` instead of the new value `it`. - `kmpuiviews/build.gradle.kts`: - Added `com.xemantic.ai:anthropic-sdk-kotlin:0.20.2` and `com.xemantic.ai:xemantic-ai-tool-schema:1.1.2` dependencies. - **Recommendation Screen UI Enhancements:** - `kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/recommendations/RecommendationScreen.kt`: - Changed `TopAppBarDefaults.exitUntilCollapsedScrollBehavior()` to `TopAppBarDefaults.pinnedScrollBehavior()`. - Modified `LaunchedEffect` to scroll to `(viewModel.messageList.lastIndex - 1).coerceAtLeast(0)` to better show the latest message. - In `SavedRecommendationItem`: - Added a `HorizontalDivider` for better visual separation. - Reordered action buttons: Delete is now first, then Search. - Added padding to the action button row. - `kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/recommendations/RecommendationViewModel.kt`: - Renamed `savedRecommendation` Flow to `savedRecommendations` for clarity. - **Account Info Screen Update:** - `favoritesdatabase/src/commonMain/kotlin/com/programmersbox/favoritesdatabase/Recommendations.kt`: - Added `getRecommendationCount()` to `RecommendationDao` to get a Flow of the total number of saved recommendations. - `kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/settings/accountinfo/AccountInfoViewModel.kt`: - `AccountInfoCount` data class now includes a `savedRecommendations` field. - The `accountInfo` flow now combines with `recommendationDao.getRecommendationCount()` to include this count. - `kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/settings/accountinfo/AccountInfoScreen.kt`: - Added a new `AccountInfoItem` to display "Saved Recommendations" and its count. - **Minor Refactor:** - `kmpuiviews/src/commonMain/kotlin/com/programmersbox/kmpuiviews/presentation/recommendations/aiproviders/OpenAiProvider.kt`: - Removed unused private property `newSettingsHandling`.
| Commit: | c313978 | |
|---|---|---|
| Author: | jacobrein | |
Refactor: Introduce Modular AI Provider System and Update Settings This commit refactors the AI recommendation feature to support multiple AI providers (Gemini and OpenAI initially) and centralizes AI-related settings. - **AI Provider Abstraction:** - `AiRecommendationHandler.kt`: Changed from a class to an interface, defining `init()` and `getResult()` methods. - `GeminiProvider.kt`: New class implementing `AiRecommendationHandler` for Gemini, encapsulating Gemini-specific logic (schema, safety settings, model initialization). - `OpenAiProvider.kt`: New placeholder class implementing `AiRecommendationHandler` for OpenAI (currently a stub). - `AiModule.kt`: New Koin module (`aiModule`) to provide named instances of `AiRecommendationHandler` (e.g., `named(AiService.Gemini.name)`). - **Settings Proto (`settings.proto`):** - Moved `aiService` and `geminiSettings` under a new `AiSettings` message. - Added `prompt` and `openAiSettings` to `AiSettings`. - `GeminiSettings`: Removed `prompt` (now in `AiSettings`). - `AiService`: Added `OpenAi` enum value. - `OpenAiSettings`: New message with `apiKey` and `modelName`. - **Settings Handling (`SettingsHandling.kt`):** - `SettingsSerializer`: Updated default settings to include `defaultAiSettings`. - `NewSettingsHandling`: - Removed individual `aiService` and `geminiSettings` ProtoStoreHandlers. - Added `aiSettings` ProtoStoreHandler to manage all AI-related settings. - `SettingsSerializer.Companion`: Added `defaultAiSettings` which includes default Gemini settings and the AI prompt. - **Recommendation ViewModel (`RecommendationViewModel.kt`):** - No longer directly injects `AiRecommendationHandler`. - Injects `KoinComponent` to dynamically get the correct `AiRecommendationHandler` based on the selected `aiService` from `aiSettings`. - Observes `aiSettings.asFlow()` to re-initialize the `aiRecommendationHandler` when the service or its settings change. - `updateGeminiSettings` renamed to `updateSettings` and now takes `AiSettings`. - Uses `aiSettings.get().prompt` for the system instruction in `GeminiProvider`. - **Recommendation Screen (`RecommendationScreen.kt`):** - `AiSettings` composable now takes `AiSettings` instead of individual service and Gemini settings. - Displays a dropdown to select `AiService` (Gemini, OpenAI). - Conditionally displays settings UI for the selected service (GeminiSettings, OpenAiSettings). - Includes a text field for the global AI `prompt`. - `onSave` now passes the updated `AiSettings` object. - Top bar subtitle now reflects `aiSettings.aiService.name`. - **Koin Module Updates:** - `AppModule.kt` (kmpuiviews): - `AiRecommendationHandler` factory removed (now handled by `aiModule`). - `KmpModule.kt`: New Koin module that includes `appModule`, `databases`, `repositories`, `viewModels`, and the new `aiModule`. This centralizes KMP-shared module definitions. - `RepositoryModule.kt` (UIViews): Removed `includes(repositories)` as it's now part of `kmpModule`. - `ViewModelModule.kt` (UIViews): Removed `includes(viewModels)` as it's now part of `kmpModule`. - `AppModule.kt` (UIViews): Removed direct inclusion of `appModule`; now uses `kmpModule`. - `OtakuApp.kt` (UIViews): Updated Koin initialization to use `kmpModule` instead of individual KMP modules. - `DesktopUi.kt` (kmpuiviews jvmMain): Updated Koin initialization to use `kmpModule`.
| Commit: | 1a28816 | |
|---|---|---|
| Author: | jacobrein | |
feat: Implement AI Recommendation Feature This commit introduces an AI-powered recommendation feature, primarily using Gemini, allowing users to get anime, manga, or novel suggestions. - **Core AI Recommendation Logic:** - `AiRecommendationHandler.kt`: - Manages interaction with the Gemini AI model. - Initializes the `GenerativeModel` with API key, model name, and prompt from settings. - Defines safety settings (blocking no harm categories) and a JSON schema for the expected recommendation response. - Provides `getResult(prompt: String)` to send user queries to the AI and receive recommendations. - `RecommendationViewModel.kt`: - Orchestrates the AI recommendation flow. - Injects `AiRecommendationHandler`, `RecommendationDao`, and `NewSettingsHandling`. - Manages a `messageList` (user queries, AI responses, errors). - Handles sending user input to the AI and parsing the JSON response into `RecommendationResponse`. - Provides functions to insert and delete recommendations from the database. - Allows updating Gemini settings and re-initializing the `AiRecommendationHandler`. - `Message` sealed class: Defines different message types (Gemini, User, Error) for the chat interface. - **Data Handling & Storage:** - `settings.proto`: - Added `AiService` enum (currently only `Gemini`). - Added `GeminiSettings` message (apiKey, prompt, modelName). - Updated `Settings` message to include `aiService` and `geminiSettings`. - `SettingsHandling.kt` (`datastore`): - Added `ProtoStoreHandler` for `aiService` and `geminiSettings`. - Default `geminiSettings` include an `AI_PROMPT` and `gemini-2.0-flash` model. - `Recommendations.kt` (`favoritesdatabase`): - Introduced `RecommendationDatabase` with `RecommendationDao`. - `Recommendation` entity: `title` (PrimaryKey), `description`, `reason`, `genre` (List<String>). - `RecommendationResponse` data class to structure AI responses. - `Converters` for `List<String>` to/from JSON for Room. - `DatabaseModule.kt` (`kmpuiviews`): Added `RecommendationDao` to Koin module. - **UI & Presentation:** - `RecommendationScreen.kt`: - New screen for interacting with the AI recommendation feature. - Uses `RecommendationViewModel`. - Displays a chat-like interface with `LazyColumn` for messages. - `MessageInput` composable for users to type queries. - `ChatBubbleItem` composable to display user and AI messages, including parsed recommendations. - `Recommendations` and `RecommendationItem` composables to display individual recommendation details. - Provides options to save/delete recommendations and search for them globally. - Integrates a settings modal (`AiSettings`) to configure Gemini (API key, model, prompt). - Drawer to display saved recommendations. - `NavGraph.kt` (`kmpuiviews`): Added `Screen.GeminiScreen` route to the navigation graph. - `SettingScreen.kt` (`kmpuiviews`): Added an "AI Recommendations" item to navigate to `Screen.GeminiScreen`. - `NavGraphView.kt` (UIViews) & `DesktopUi.kt` (`kmpuiviews`): Updated settings navigation to include the Gemini screen. - **Dependency & Configuration:** - `build.gradle.kts` (`kmpuiviews`): Added `dev.shreyaspatil.generativeai:generativeai-google:0.9.0-1.1.0` dependency. - `Utils.kt` (`datastore`): Added `AI_PROMPT` constant defining the system prompt for the Gemini model. - `AppModule.kt` (`kmpuiviews`): Added `AiRecommendationHandler` to Koin module. - `ViewModelModule.kt` (`kmpuiviews`): Added `RecommendationViewModel` to Koin module. - **Minor Changes:** - `Platform.ios.kt`: Commented out experimental biometric authentication code. - `ItemDatabase.kt`: Removed an extraneous blank line.
| Commit: | be8d8df | |
|---|---|---|
| Author: | jacobrein | |
Refactor: Centralize Media Update Checker Settings This commit centralizes the settings for the media update checker into a new `MediaCheckerSettings` proto message and updates relevant parts of the application to use these new settings. - **Datastore:** - Added `MediaCheckerSettings` message to `settings.proto` to hold configurations like `shouldRun`, `networkType`, `requiresCharging`, `requiresBatteryNotLow`, and `interval`. - Introduced `MediaCheckerNetworkType` enum (`Connected`, `Metered`, `Unmetered`). - Updated `SettingsHandling.kt` to include `mediaCheckerSettings` as a `ProtoStoreHandler` with default values. - **Koin Dependency Injection:** - Changed `BackgroundWorkHandlerImpl` in `KmpInteropModule.kt` to use `singleOf` for instantiation and bind it to `BackgroundWorkHandler`. - **Onboarding (GeneralContent.kt):** - Refactored the general settings UI to use `CategoryGroup` for better visual organization. - Replaced individual `shouldCheck` and `updateHourCheck` datastore preferences with the new `mediaCheckerSettings` preference. - Added UI elements for configuring: - Network type for media checking (Connected, Metered, Unmetered). - Update interval (slider). - Whether the checker should only run when charging. - Whether the checker should not run on low battery. - Settings are now conditionally displayed based on `mediaCheckerSettings.shouldRun`. - **Background Work (BackgroundWorkHandlerImpl.kt):** - Modified `setupPeriodicCheckers` to use `settingsHandling.mediaCheckerSettings.asFlow()` to observe changes and configure the `UpdateFlowWorker`. - The `UpdateFlowWorker` is now configured based on `shouldRun`, `interval`, `networkType`, `requiresCharging`, and `requiresBatteryNotLow` from `MediaCheckerSettings`. - The previous logic using `dataStoreHandling.shouldCheck` and `dataStoreHandling.updateHourCheck` has been commented out/removed. - **Notification Settings UI (NotificationSettingsScreen.kt & NotificationSettingsViewModel.kt):** - **ViewModel:** - Updated `NotificationSettingsViewModel` to use `settingsHandling.mediaCheckerSettings` instead of the old `dataStoreHandling.shouldCheck` and `dataStoreHandling.updateHourCheck`. - Added methods to update individual fields within `mediaCheckerSettings` (`updateNetworkType`, `updateRequiresCharging`, `updateRequiresBatteryNotLow`). - **Screen:** - Refactored `NotificationSettingsScreen` to display and allow modification of the new `MediaCheckerSettings` (network type, interval, charging requirement, battery not low requirement). - Uses `AnimatedVisibility` for the settings section based on `viewModel.canCheck` (derived from `mediaCheckerSettings.shouldRun`). - Settings related to the media checker are grouped using `CategoryGroup`. - Added `ListSetting` for choosing the network type. - Added `SwitchSetting` for `requiresCharging` and `requiresBatteryNotLow`.
| Commit: | 3d46622 | |
|---|---|---|
| Author: | jacobrein | |
feat: Add option to include insets in reader and update dependencies This commit introduces a new setting to include system insets in the reader view, improving the user experience, and updates the Ackpine dependency. - **Reader View:** - Added a new setting to include insets in the reader view. - Added a new `includeInsetsForReader` field to the `MangaSettings` data class. - Updated the `ReaderCompose` composable to respect the `includeInsetsForReader` setting. - Added a switch to the reader settings to toggle the `includeInsetsForReader` option. - Added a switch to the onboarding to toggle the `includeInsetsForReader` option. - - Updated `MangaSettings` to set `includeInsetsForReader` to true when migrating. +- **Manga Settings Migration:** + - Updated `MangaSettings` to set `includeInsetsForReader` to `true` when migrating. - **Dependencies:** - Updated Ackpine to version 0.11.2. + - Update `manga_settings.proto` to include the `includeInsetsForReader` option.
| Commit: | 4538a23 | |
|---|---|---|
| Author: | jacobrein | |
feat: Add Multiplatform Manga Settings and Migrate Old Settings This commit introduces a new multiplatform library for handling manga-specific settings and migrates the existing settings to this new system. - **Multiplatform Manga Settings Library:** - Added a new `mangasettings` library under the `datastore` module. - This library uses `protobuf` for data serialization and is designed to be multiplatform. - Created `MangaNewSettingsHandling.kt` to manage settings in a multiplatform way. - Created `manga_settings.proto` to define the structure of the settings data. - Added `MangaNewSettingsSerializer` for the new `MangaSettings` class. - - Added `gitignore`, `build.gradle.kts` and `AndroidManifest.xml` for the new `mangasettings` library. + - Added `gitignore`, `build.gradle.kts` and `AndroidManifest.xml` for the new `mangasettings` library. + - Changed `getDataStore` and `createDataStore` to use generics. - Updated `Platform.android.kt`, `Platform.jvm.kt`, and `Platform.ios.kt` to support the new data store. - Updated `Platform.kt` to support the new generic data store functions. - Created `proguard-rules.pro` and `consumer-rules.pro` for the new library. - **Settings Migration:** - Created a migration function that moves old settings to the new ones. + - Created `MangaApp.kt` to run the migration. - `MangaSettingsHandling` now uses `MangaNewSettingsHandling` + - added `hasMigrated` field to keep track of if the migration has happened. - **Code Changes:** - Updated `GenericManga.kt` to use `MangaNewSettingsHandling`. - Updated `ReadActivity.kt` to use `MangaNewSettingsHandling`. - - **UI Changes** + - Updated `ImageLoaderSettings.kt` to use `MangaNewSettingsHandling`. + - Updated `ReaderOnboarding.kt` to use `MangaNewSettingsHandling`. + - Updated `MangaWorldSettings.kt` to use `MangaNewSettingsHandling`. + - Updated `ReaderSettings.kt` to use `MangaNewSettingsHandling`. + - Updated `Sheets.kt` to use `MangaNewSettingsHandling`. + - Removed `UNRECOGNIZED` from the `ReaderType` when getting the settings. + - **UI Changes:** - Added an `Image` default to the Image settings so that there is something if none are found. - added `leadingIcon` to more settings options. - Fixed an issue with `SystemThemeMode` - - removed `UNRECOGNIZED` from the `ReaderType` list. - - updated `SettingsHandling.kt` - - **UI Changes** + - removed `UNRECOGNIZED` from the `ReaderType` list in `Sheets.kt` and `ReaderSettings.kt` + - **Multiplatform Roadmap:** + - Updated `Multiplatform Roadmap.md` to reflect completed tasks. - removed `UNRECOGNIZED` from the `ReaderType` list. - **Misc:** - Updated `build.gradle.kts` and `settings.gradle.kts` to use the new `mangasettings` library. - Updated `build.gradle.kts` to use the new `mangasettings` library. + - Removed extra `.`s in file names.
| Commit: | 5276882 | |
|---|---|---|
| Author: | jacobrein | |
feat: Migrate Old Settings to New Settings Datastore This commit migrates the old settings to the new settings data store, ensuring a seamless transition for users. - **Settings Migration:** - Implemented a settings migration process to transfer settings from the old `SettingsHandling` to the new `NewSettingsHandling`. - Added `hasMigrated` to the `Settings` and `Preferences` models to indicate if the migration has already been done. - Added `hasMigrated` to `DataStoreHandling` to store the status. - Updated the `migrateSettings` function to handle the migration. - Added a check to make sure that settings are migrated only once. - Migrates `Settings` to the new `Settings` protocol model. - Added the ability to migrate the old `Preferences` datastore to the new `Settings` datastore. - - Migrated `SystemThemeMode`, `GridChoice`, `ThemeColor`, `MiddleNavigationAction`, `MiddleMultipleActions`, and `NotificationSortBy` - - Migrates `SystemThemeMode`, `GridChoice`, `ThemeColor`, `MiddleNavigationAction`, `MiddleMultipleActions`, and `NotificationSortBy` to their new version in the proto model. - - Migrates the old `Settings` to the new `Settings` protocol model. - - Added `hasMigrated` to the `Settings` and `Preferences` models to indicate if the migration has already been done. - - Added `hasMigrated` to `DataStoreHandling` to store the status. - - Added the ability to migrate the old `Preferences` datastore to the new `Settings` datastore. + - Migrates `SystemThemeMode`, `GridChoice`, `ThemeColor`, `MiddleNavigationAction`, `MiddleMultipleActions`, and `NotificationSortBy` to their new version in the proto model. - Added `hasMigrated` to `DataStoreHandling` to store the status. - - Migrates the old `Preferences` datastore to the new `Settings` datastore. - - Added a check to make sure that settings are migrated only once. - - Updates UI to now allow for null `MiddleMultipleActions`. - - Removed `UNRECOGNIZED` from `ThemeColor` enum. - - Removed the need for the `GlobalScope` on the `dataStore` migration by only running it if the `hasMigrated` is false. - - Updated `ThemeContent` to now use the `NewSettingsHandling` instead of `SettingsHandling`. - - Updated `GeneralContent` to now use the `NewSettingsHandling` instead of `SettingsHandling`. - - Fixed a bug with `multipleActions` in `MultipleActions` not allowing for null. + - Removed `UNRECOGNIZED` from `ThemeColor` enum. + - Updated `ThemeContent` to now use the `NewSettingsHandling` instead of `SettingsHandling`. + - Updated `GeneralContent` to now use the `NewSettingsHandling` instead of `SettingsHandling`. + - Fixed a bug with `multipleActions` in `MultipleActions` not allowing for null. + - Removed the need for the `GlobalScope` on the `dataStore` migration by only running it if the `hasMigrated` is false. + - Updates UI to now allow for null `MiddleMultipleActions`.
| Commit: | 2fe8e1a | |
|---|---|---|
| Author: | jacobrein | |
feat: Add Multiplatform Settings and Migrate Existing Settings This commit introduces a new multiplatform settings system using `DataStore` and migrates existing settings to the new format. - **Multiplatform Settings:** - Added a new `Settings` proto file to define the structure of the settings data. - Implemented a new `NewSettingsHandling` class to manage the new settings using `DataStore`. - Added platform-specific implementations for Android, JVM, and iOS to handle data storage. - Added `getDataStore` function to get a `DataStore` instance. - Added a `SettingsSerializer` to handle the serialization and deserialization of the settings data. - Added `createDataStore` function to create a data store instance. - - Updated `SettingsHandling` to use `Okio` + - Added `createProtobuf` to make getting the data store easier for android. - **Settings Migration:** - Added a migration process to transfer existing settings from the old `SettingsHandling` to the new `NewSettingsHandling`. - - Added `migrateSettings` function to migrate old settings. - - Added `dataStore.data.onEach` to migrate old settings to new settings. - Removed the `UNRECOGNIZED` enum from `GridChoice`, `ThemeColor`, `SystemThemeMode`, `MiddleNavigationAction`, and `NotificationSortBy` - - Added `dataStore.data.onEach` to migrate old settings to new settings. +- Added `migrateSettings` function to migrate old settings. +- Added `dataStore.data.onEach` to migrate old settings to new settings. - **Proto:** - Added a `settings.proto` file to define the structure of the `Settings` message. - - Added `SettingsSerializer` to read and write to the `proto` file. + - Added `SettingsSerializer` to read and write from the `proto` file. + - Updated the build.gradle to use wire. - Added `GenericSerializer` to handle serialization of `proto` files. + - Changed `MiddleNavigationAction.UNRECOGNIZED` to just `MiddleNavigationAction.Multiple` + - Changed `MiddleMultipleActions` to use `MiddleNavigationAction` + - Updated `settings.proto` to use `MiddleMultipleActions` +- **Custom Settings:** + - Removed the `UNRECOGNIZED` enum from `MiddleNavigationAction`. + - Updated `visibleName` to use the name instead of having extra logic. - **UI/UX Improvements:** - Updated the settings UI to use the new settings management system. - Updated the settings UI to use the new settings management system. - Updated `rememberMiddleNavigationAction` to use `multipleActions`. - - Added `MiddleMultipleActions` to hold two different actions. - - Added a method to get the proper seedColor. + - Added a method to get the proper `seedColor`. + - **Minor Changes:** + - Removed gson from the project. + - Added wire to the project. + - Updated `MiddleNavigationAction` to use `Multiple` instead of `UNRECOGNIZED`. + - Removed unnecessary comments. +- Updated `MiddleNavigationItem` to use `MiddleNavigationAction` +- Updated `getDataStore` to have a `producePath` lambda. +- Added `BatteryPercent` to the new settings. +- Added `NotificationSortBy` to the new settings. +- Added `customUrls` to the new settings. +- Added `showAll` to the new settings. +- Added `shareChapter` to the new settings. +- Added `historySave` to the new settings. +- Added `showBlur` to the new settings. +- Added `usePalette` to the new settings. +- Added `amoledMode` to the new settings. +- Updated `ThemeColor` to not include `UNRECOGNIZED`. +- Added `rememberGridChoice`, `rememberThemeColor`, `rememberShowExpressiveness`, and `rememberMiddleMultipleActions` +- Added `notifyOnReboot` to the new settings. - **Remote Config:** - Updated `RemoteConfigKeys` to reflect the changes in settings. - **Misc:** - Updated `Multiplatform Roadmap.md` - - Fixed a crash when removing custom urls. - - Removed gson from the project. - - Added `MiddleMultipleActions` to hold two different actions. - - Updated `MiddleNavigationAction` to use `Multiple` instead of `UNRECOGNIZED`. + - Fixed a crash when removing custom urls. - Cleaned up code. - Refactored `SettingsHandling` to use `ProtoStoreHandler` - Updated `ProtoStoreHandler` to have a `set` and `get` function. - Updated `OtakuApp` to migrate the old settings to new settings. - Updated `OtakuApp` to create a protobuf data store. - Updated `settingsHandling` to use a lambda. - Updated `settingsHandling` to use the new protobuf data store. -- Updated `getDataStore` to have a `producePath` lambda. -Added `BatteryPercent` to the new settings. -- Added `NotificationSortBy` to the new settings. -Added `customUrls` to the new settings. -- Added `showAll` to the new settings. -- Added `shareChapter` to the new settings. -- Added `historySave` to the new settings. -- Added `showBlur` to the new settings. -- Added `usePalette` to the new settings. -- Added `amoledMode` to the new settings. -- Updated `ThemeColor` to not include `UNRECOGNIZED`. -- Added `rememberGridChoice`, `rememberThemeColor`, `rememberShowExpressiveness`, and `rememberMiddleMultipleActions` -Changed `MiddleNavigationAction.UNRECOGNIZED` to just `MiddleNavigationAction.Multiple` -- Updated `MiddleMultipleActions` to use `MiddleNavigationAction` -Removed unnecessary comments. -Updated `MiddleNavigationItem` to use `MiddleNavigationAction` -Added `notifyOnReboot` to the new settings. -Updated `settings.proto` to use `MiddleMultipleActions` -Updated `settings.proto` to use `MiddleNavigationAction`
| Commit: | b15b559 | |
|---|---|---|
| Author: | jacobrein | |
Refactor: Improve Reader Settings and UI Components This commit refactors the reader settings and improves UI components for better user experience and code organization. - **Reader Settings Overhaul:** - Removed `PlayingStartAction` and `PlayingMiddleAction` from `MangaSettings`. - Removed `playingStartAction`, `onStartOptionChange`, `middleAction`, `onMiddleActionChange`, `batteryValue`, and `onBatteryChange` parameters from the `ReaderSettings` composable. - Removed `batteryPercent` state variable. - Removed `startOption` and `middleAction` from `ReaderCompose`. - Removed `startAction`, `onStartActionChange`, `middleAction`, and `onMiddleActionChange` parameters from the `SettingsPopup` composable. - Removed the ability to have `startAction` and `middleAction`. - **Reader UI Updates:** + - Updated `FloatingBottomBar` to remove the `onSettingsClick` + - Updated `ReaderTopBar` to have an `onSettingsClick` instead of `playingStartAction` and `playingMiddleAction` - Removed the `ReaderTopBar` from the `ReaderSettings` Screen. - Updated `ReaderTopBar` to only show the chapter number and have a settings button. - Updated `ReaderTopBar` to use normal `TopAppBar` instead of `CenterAlignedTopAppBar` - Updated the page counter in `FloatingBottomBar` to animate to the new number. - **Dependency Updates:** - Updated `ackpineVersion` to "0.11.0". - Updated `jsoup` to 1.19.1 - **Other Changes:** - Updated `DownloadAndInstaller` to immediately ask the user if they want to install. - Cleaned up code.
| Commit: | 4729fff | |
|---|---|---|
| Author: | jacobrein | |
Refactor: Update notification handling and add notify on boot option This commit refactors the notification handling in the settings and adds a new option to notify on boot. - Updates the `SettingsFragment` to always show the notifications option. - Updates the `NotificationViewModel` to include a `notifyOnBoot` property. - Adds a `notifyOnReboot` preference to the `SettingsHandling` data store. - Adds `notifyOnReboot` in `settings.proto`. - Updates `InfoSettings` to remove the APK file removal check when updating the app. - Adds a `Notify on Boot` switch in `NotificationSettings`. - Updates the `BootReceived` class to conditionally view notifications based on the `notifyOnBoot` setting. - Refactors the `NotificationFragment` to use a `ModalBottomSheetDelete` component for deleting notifications. - Updates `ModalBottomSheetDelete` to allow deletion of multiple notifications. - Updates `ModalBottomSheetDelete` to show clear all button. - Updates `ModalBottomSheetDelete` to show a delete all option. - Removes `cancelNotification` from `NotificationFragment`. - Updates `NotificationFragment` to show delete icon and sort. - Removes `BottomSheetDeleteGridScaffold` and `BottomSheetDeleteScaffold` - Updates `ModalBottomSheetDelete` to show a cancel and remove button. - Update `ModalBottomSheetDelete` to show the clear all button and delete all option. - Updates `NotificationFragment` to not use a grid. - Updates `NotificationFragment` to use `Scaffold`. - Updates `NotificationFragment` to show a delete icon. - Updates `NotificationFragment` to show current notification count in the top bar. - Minor update to use `nestedScroll` in `ModalBottomSheetDelete`. - Update `BaseMainActivity` to stop collecting data on close.
| Commit: | 81d107f | |
|---|---|---|
| Author: | jacobrein | |
- Update Dependencies & UI Refinements This commit updates several dependencies, including: - Haze to 1.0.0 - Landscapist to 2.4.2 - Firebase KTX to 0.2.1 - Core Library Desugaring to 2.1.3 It also introduces a new UI setting for animation expressiveness and adjust the General Settings layout with spacing between elements for improved visual appeal.
| Commit: | 6c93b6a | |
|---|---|---|
| Author: | jacobrein | |
- Feat: Add Floating Reader Bottom Bar Option This commit adds a new setting to enable a floating bottom bar in the reader. - A new setting is added to the reader settings and global settings to toggle the floating bottom bar. - The bottom bar is now displayed as a floating bar when the setting is enabled. - The floating bar is hidden by default and can be expanded by tapping on a small icon. - The bar contains buttons for page selection, settings, chapter change, and chapter list.
| Commit: | 97af2d2 | |
|---|---|---|
| Author: | jacobrein | |
- Feat: Add User Gesture Setting for Reader Chapter List This commit introduces a new setting that allows users to enable or disable user gestures for navigating the chapter list within the reader. - A toggle switch is added to the Reader Settings menu to control this setting. - When enabled, users can swipe to navigate the chapter list. - When disabled, swipe gestures are ignored, and users must tap on a chapter to change it.
| Commit: | 720cc9d | |
|---|---|---|
| Author: | jacobrein | |
- Refactor: Reorganize General Settings and Bottom Navigation Bar This commit refactors the general settings screen and bottom navigation bar: - Reorganizes the general settings screen for better readability and consistency. - Adds the option to configure the middle navigation action for multiple actions. - Refactors the navigation bar to be bottom or rail-style depending on screen size. - Adds support for a middle action button for navigation with multiple actions. - Improves handling of screen transition animations for the bottom navigation bar.
| Commit: | 51827da | |
|---|---|---|
| Author: | jacobrein | |
- Feat: Add Middle Navigation Action Setting This commit adds a new setting to configure the middle navigation action for compact width devices. The setting allows users to choose between: - All - Notifications - Lists - Favorites - Search This setting is only visible on compact width devices and replaces the "Show All Screen" setting in those cases.
| Commit: | a38c221 | |
|---|---|---|
| Author: | jacobrein | |
feat: Add theme color setting Adds a new setting to allow users to select a theme color. The setting includes options for dynamic, blue, red, green, yellow, cyan, magenta, and custom colors. This allows for greater customization of the app's appearance. Also updates several dependencies to their latest versions.
| Commit: | aaffb53 | |
|---|---|---|
| Author: | jacobrein | |
- Update dependencies Update Compose to 1.7.0-beta07, Room to 2.7.0-alpha06, Navigation to 2.8.0-beta07, Paging to 3.3.2, and WorkManager to 2.9.1. Also add a setting to change the grid type.
| Commit: | ae02713 | |
|---|---|---|
| Author: | jacobrein | |
- Adding Telephoto image loader as an option - Added Telephoto as an option to the ImageLoaderType enum in manga_settings.proto. - Implemented Telephoto image loading in ReaderComposeImage.kt. - Included Telephoto in the ImageLoaderSettings screen. - Trying Telephoto out.
| Commit: | 97542ad | |
|---|---|---|
| Author: | jacobrein | |
- adding page curl!
| Commit: | bce6b61 | |
|---|---|---|
| Author: | jacobrein | |
- updating lib - adding a flip pager to look like you are turning/flipping the page!
| Commit: | 23d5ad0 | |
|---|---|---|
| Author: | jacobrein | |
- adding option to use blur or not. There will probably be other things I need to fix but this is a good start - replacing some dependencies with the androidx version catalog!
| Commit: | 6cc2ad0 | |
|---|---|---|
| Author: | jacobrein | |
- updating to kotlin 2.0.0 stable! - Adding option to choose what Image Loader the user wants to use so I can see what works best
| Commit: | 077a0f1 | |
|---|---|---|
| Author: | jacobrein | |
- Adding option to use palette or not
| Commit: | 9d9996b | |
|---|---|---|
| Author: | jacobrein | |
Adding amoled mode!
| Commit: | f39259c | |
|---|---|---|
| Author: | Jacob Rein | |
Adding proto settings to MangaWorld That includes settings for the start and middle actions for the reader top bar
| Commit: | 7d812d9 | |
|---|---|---|
| Author: | Jacob Rein | |
Cleaning up Adding a custom url addition only if custom bridge is installed
| Commit: | 9452a51 | |
|---|---|---|
| Author: | Jacob Rein | |
Adding a new setting Adding a bottom bar to the details screen so we can show and hide the header at the press of a button
| Commit: | ab8265b | |
|---|---|---|
| Author: | Jacob Rein | |
Adding a ListDetailPaneScaffold to the List screens. I want to play around with it and see if it's worth continuing with them
| Commit: | 1b71e07 | |
|---|---|---|
| Author: | Jacob Rein | |
Adding a grouped by source option to NotificationFragment.kt
| Commit: | 875050c | |
|---|---|---|
| Author: | Jacob Rein | |
Starting to make use of protobuf