From ecc235427bd063a71e09077a1748a9007c1a6dba Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Mon, 7 Jul 2025 19:37:08 -0400 Subject: [PATCH] Prompt to unarchive after editing --- README.md | 1 + src/password_manager/manager.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index a901aef..aa88e8d 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,7 @@ When choosing **Add Entry**, you can now select **Password**, **2FA (TOTP)**, 3. Enter new values or press **Enter** to keep the existing settings. 4. The updated entry is saved back to your encrypted vault. 5. Archived entries are hidden from lists but can be viewed or restored from the **List Archived** menu. +6. When editing an archived entry you'll be prompted to restore it after saving your changes. ### Using Secret Mode diff --git a/src/password_manager/manager.py b/src/password_manager/manager.py index 2ea9b56..917528f 100644 --- a/src/password_manager/manager.py +++ b/src/password_manager/manager.py @@ -2096,6 +2096,11 @@ class PasswordManager: exc_info=True, ) + updated_entry = self.entry_manager.retrieve_entry(index) + if updated_entry: + self._prompt_toggle_archive(updated_entry, index) + pause() + except Exception as e: logging.error(f"Error during modifying entry: {e}", exc_info=True) print(colored(f"Error: Failed to modify entry: {e}", "red"))