Skip to content

[codex] Add lock database on back setting#318

Merged
aivanovski merged 1 commit into
masterfrom
feature/add-press-back-to-lock-setting
May 28, 2026
Merged

[codex] Add lock database on back setting#318
aivanovski merged 1 commit into
masterfrom
feature/add-press-back-to-lock-setting

Conversation

@aivanovski

@aivanovski aivanovski commented May 28, 2026

Copy link
Copy Markdown
Owner

What changed

  • Added a persisted isLockDatabaseOnBack application setting with a default value of true.
  • Exposed the option in Application settings under the General section.
  • Removed isCloseDatabaseOnExit from GroupsScreenArgs and made Groups back handling read from settings instead.
  • Updated Groups back behavior:
    • when the setting is enabled, pressing Back from the root group locks the database and follows the existing exit flow;
    • when the setting is disabled, pressing Back finishes the activity without calling router.exit().
  • Updated root navigation so an already-open database starts with GroupsScreen over UnlockScreen; closed databases still start on UnlockScreen.
  • Updated activity-level back handling to use OnBackPressedCallback and delegate unhandled back presses through the Cicerone router.
  • Moved note editor back handling into the fragment onBackPressed() path.
  • Bumped AppCompat from 1.6.1 to 1.7.1.

Why

The previous lock-on-back behavior was passed through screen arguments, which made it depend on navigation entry points. This moves the behavior into a user-facing application setting and keeps root navigation consistent when the database is already open.

The activity and note editor back handling changes are included in this branch because the new root chain/back behavior depends on consistent router-backed back dispatch.

Validation

  • ./gradlew app:spotlessApply
  • ./gradlew test
  • ./gradlew app:compileFdroidDebugKotlin

Notes: validation passed with existing Android Gradle Plugin / resource formatting / deprecation warnings.

@aivanovski aivanovski linked an issue May 28, 2026 that may be closed by this pull request
@aivanovski aivanovski marked this pull request as ready for review May 28, 2026 17:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d49ea311df

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@aivanovski aivanovski added this to the 1.17.0 milestone May 28, 2026
@aivanovski aivanovski merged commit d81c0cf into master May 28, 2026
11 checks passed
@aivanovski aivanovski deleted the feature/add-press-back-to-lock-setting branch May 28, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't lock on navigate up (back gesture/button), add lock button

1 participant