- Removed unused parameters and functions related to biometric protection and save/reset operations in AppShell.kt and AppDialogs.kt.
- Simplified logging and toast messages in JsonImportExportDialog.kt.
- Improved null safety and file output stream handling in JsonImportExportDialog.kt.
- Updated AndroidManifest.xml with target API level and tools namespace.
This commit addresses several linter warnings and removes unused code to improve maintainability.
- Removed unused function and property in .
- Removed unused parameter from , , and .
- Fixed a variable shadowing issue with in .
- Inlined a redundant variable in .
Fixed the build errors in GuidedTourScreen.kt that occurred after migrating to androidx.compose.foundation.pager.
- Added pageCount to rememberPagerState.
- Removed count from HorizontalPager.
- Restored the R import.
Removed redundant 'if (jsonString != null)' checks in JsonImportExportDialog.kt as jsonString is always non-null at these points, addressing 'Condition is always true' warnings.
Migrated the GuidedTourScreen from deprecated Accompanist Pager to androidx.compose.foundation.pager.
Removed HorizontalPagerIndicator usage, as a direct replacement is not available and requires custom implementation.
- Fixed `Unresolved reference` error for startup password dialog variables by correctly declaring them in `AppShell.kt`.
- Added missing German translations for encryption-related strings in `strings.xml`.
- Corrected `onUnlockEncryption` logic in `AppShell.kt` to properly handle password-based decryption, addressing the "Unlock failed" error.
- Ensured the app closes when the `StartupPasswordDialog` is cancelled in `AppDialogs.kt`.
- Prevented automatic biometric binding when setting an encryption password in `EncryptionPasswordDialog.kt`, allowing users to choose password-only encryption.
- Adjusted biometric prompt behavior in `AppShell.kt` to allow multiple fingerprint attempts before falling back to the password dialog.
This commit introduces several improvements to the password protection feature for notes, recipes, and shopping lists.
- Password confirmation and visibility: When setting a password, the user is now prompted to enter it twice for confirmation. A visibility toggle has been added to both the set password and unlock dialogs to improve user experience.
- Differentiated unlock methods: The app now distinguishes between password and biometric protection. If an item is locked with a password, the app will directly prompt for the password instead of attempting biometric authentication first.
- Fixed disappearing lock icon: A bug was fixed where the lock icon would disappear after an item was unlocked and then edited. The lock state is now correctly preserved.
- Removed the separate PIN lock functionality.
- Consolidated PIN lock related UI and logic into the pattern lock implementation.
- Deleted and introduced .
- Updated , , and to reflect these changes.
- Added string resource.
- Implement pattern lock functionality with a custom pattern input view.
- Fix an issue where the lock icon was only visible for password-locked items.
- Add missing German translations.
This commit introduces new lock methods for notes, recipes, and shopping lists, allowing users to choose between Password, Biometric, Pattern, and PIN for item protection.
Changes include:
- Expanded `LockMethod` enum with `PATTERN` and `PIN`.
- Updated `ChooseLockMethodDialog` to display new lock options.
- Added `lockMethod` field to `Note`, `Recipe`, and `ShoppingList` data classes.
- Implemented database migration (version 9 to 10) to support the new `lockMethod` field.
- Modified `AppShell.kt` to correctly handle the selection of new lock methods.
- Created placeholder dialogs (`SetPatternDialog`, `SetPinDialog`) and ViewModel functions for future implementation of pattern and PIN entry UIs.
- Updated `AppTopBar.kt` to show the "Lock" option in the dropdown menu for all item types, triggering the `ChooseLockMethodDialog`.
This commit fixes a bug that prevented new items (notes, recipes, and shopping lists) from being saved and existing items from being renamed.
The issue was caused by a race condition where the item details were being reset before the save operation could complete. This was due to a nested coroutine launch that caused the UI to update prematurely.
The fix involves:
- Removing the nested coroutine launch to ensure sequential execution of the save and UI reset operations.
- Moving the `reset...Details()` calls to the ViewModels to ensure they are only called after the save operation is complete.
Updated the function in to directly accept as a parameter. This ensures that the correct is fetched from the repository and its protection status is updated, addressing the issue where protection was not being applied due to an incorrect or uninitialized from the UI state.
Note: This commit also includes other uncommitted changes as requested by the user.
- Introduced a `SecretKeySaver` to persistently store the encryption `secretKey` across configuration changes using `rememberSaveable`.
- Ensured that the `secretKey` is updated in the `AppShell`'s state upon successful biometric authentication for unlocking notes, lists, and recipes.
- This addresses the bug where locked items could be bypassed due to the `secretKey` being lost on screen rotation or other configuration changes, leading to failed re-locking.
- This also resolves the issue where the unlock button for locked items would only work after an app restart.
- Fixed an issue where the biometric prompt appeared twice when attempting to change the encryption password. The redundant prompt has been removed.
- Addressed an issue where the biometric prompt would reappear on screen rotation for locked notes, lists, and recipes. The unlock state now persists across configuration changes.
- The "Remove Encryption" button has been removed from the settings.
- Changing the encryption password now exclusively requires fingerprint authentication.
- This resolves a crash that occurred when device credential fallback was enabled with a negative button on the biometric prompt.
Also includes dependency updates.
This commit introduces several improvements to the JSON import functionality:
- Enhanced error handling for both manual and automatic JSON imports in and .
- Implemented graceful fallback to unencrypted parsing if decryption fails.
- Added specific error handling for and generic during JSON parsing.
- Provided user-friendly Toast messages for import failures.
- Improved error logging in for when encrypted data is too short.
- Added missing string resources for import error messages and their German translations.
- Ensured correct placement of resource to avoid duplicates and created missing .
- Added debug logging to show raw JSON strings before parsing for better diagnostics.
These changes make the import process more robust and provide clearer feedback to the user in case of corrupted or malformed import files.
- Corrected 'Unresolved reference 'prefs'' by updating 'OnSharedPreferenceChangeListener' to use 'sharedPreferences' parameter.
- Reverted 'showDeleteConfirmationDialog' to 'var ... by remember' to resolve ''val' cannot be reassigned' and 'Assignment type mismatch' errors.
- Entferne ungenutzte Funktionen und Parameter in ViewModels und Composable-Funktionen.
- Optimiere String-Manipulationen und Uri-Parsing.
- Aktualisiere die Kotlin-Version in libs.versions.toml.
- Füge neue Einträge zu .idea/dictionaries/project.xml hinzu und ignoriere neue .idea-Dateien.
This commit introduces a guided tour feature to the app.
- A new has been added to provide an introduction to the app's functionalities.
- A "Show Guided Tour" button has been added to the settings screen, allowing users to revisit the tour.
- Logic has been implemented to display the guided tour automatically on the first launch of the app.
- String resources for the guided tour have been added in both English and German.
- Accompanist Pager dependencies have been added to for the tour's UI.
- Minor fixes to XML escaping in string resources have been applied.
- Implemented a "Reset" button with a confirmation dialog in WebAppIntegrationScreen.
- Added resetWebAppIntegration() to WebAppIntegrationViewModel to clear stored credentials.
- Localized all Toast messages in WebAppIntegrationViewModel by using string resources.
- Added corresponding string resources and German translations.
- Removed redundant Scaffold and TopAppBar from WebAppIntegrationScreen.
- Configured MainActivity's TopAppBar to show a back arrow for WebAppIntegrationScreen.
- Made WebAppIntegrationScreen content scrollable to improve usability in landscape mode.
- Replaced "Import from Web App" TextButton with an IconButton (CloudDownload icon) in ShoppingListDetailScreen.
- Moved the web app import button to the TopAppBar in MainActivity, positioned left of the search icon for ShoppingListDetailScreen.
- Updated AboutScreen to include a more comprehensive list of used open-source libraries.
- Added corresponding string resources and German translations for the new library entries.
When an item was marked as done in the mobile app, all items were marked as done in the web app. This was because the `importItemsFromWebApp` function always marked all fetched items as processed on the server.
This commit fixes this by:
- Removing the call to `markItems` from `importItemsFromWebApp`.
- Adding a new function `markItemInWebApp` that is called when a single item is tapped, which correctly synchronizes the state of the single item with the web app.
- Ändert die Datentypen für `is_standard` und `marked` in der `Item`-Datenklasse von `Boolean` auf `Int`, um sie an die API-Antwort (0/1) anzupassen.
- Verbessert die Importlogik, um das Hinzufügen doppelter Artikel zu verhindern.
- Ersetzt die lokale `web-app` durch eine Client-Server-Architektur.
- Implementiert den `WebAppClient` für die Kommunikation mit dem neuen Web-API, einschließlich Authentifizierung, Abrufen und Ändern von Artikeln.
- Aktualisiert die ViewModels und das Repository, um den neuen Web-Client zu integrieren.
- Fügt die erforderlichen Netzwerkberechtigungen und String-Ressourcen hinzu.
- Das alte `web-app`-Verzeichnis wird entfernt.
Adds the currently selected sync folder path to the navigation drawer.
This provides users with clear feedback on which folder is configured for synchronization. The displayed path is shortened to `Parent / Child` for readability and to prevent layout issues.
Resolves a critical bug that caused permanent data loss of locked items when encryption was disabled.
The previous implementation deleted the encryption key without decrypting the data first. This commit introduces a safe-offboarding process:
- When disabling encryption, the user is now authenticated to retrieve the secret key.
- New `decryptAllLockedItems` functions in the ViewModels are called to decrypt all locked notes, recipes, and shopping lists across the app.
- Only after successful decryption is the key permanently deleted.
Additionally, this commit removes the last remnants of the old session-based unlocking logic and standardizes the auto-relock-on-exit behavior across all detail screens for a consistent user experience.