f5156e70c3e379c99cbac52b1dd357870b4039e5
This commit fixes a critical bug where saving an already encrypted item would lead to double encryption, making the data unrecoverable. The `save` methods in the ViewModels (`RecipesViewModel`, `NotesViewModel`, `ShoppingListsViewModel`) were encrypting content if the `isLocked` flag was true, without checking if the content was already encrypted. This happened when saving on navigating back from the detail screen. The fix introduces an `isDecrypted` flag in the `...Details` data classes. - This flag is set to `true` only when content is explicitly decrypted for viewing or editing. - The `save` methods now only perform encryption if `isLocked` is true AND `isDecrypted` is true. - This ensures that already encrypted data is never re-encrypted.
Description
Noteshop is a versatile and privacy-focused application for managing your notes, shopping lists, and recipes all in one place. It is designed to be simple, efficient, and fully under your control
Languages
Kotlin
98%
Python
2%