Skip to content

Conversation

@david-allison
Copy link
Member

Purpose / Description

  • Enable 'Don't Keep Activities'
  • Edit Note
  • Restore Activity
  • Press Back
  • 'Discard changes' incorrectly shown

This was caused as 'isFieldEdited' was incorrectly set

Broken in abcfcce

Fixes

Approach

isFieldEdited wasn't required if we were editing a note ... just check if the note's fields were changed

How Has This Been Tested?

Pixel 9 Pro, while editing

  • Press back, with no changes => no dialog
  • Press back, with changes => dialog
  • Restore state, with no changes => no dialog
  • Restore state, with changes => dialog

Learning

I want to refactor, but the screen is in maintenance mode

I didn't realize Kotlin made List == List work correctly (vs how java handled it).

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

* Enable 'Don't Keep Activities'
* Edit Note
* Restore Activity
* Press Back
* 'Discard changes' incorrectly shown

This was caused as 'isFieldEdited' was incorrectly set

But this check wasn't required if we were editing a note
... just check if the note's fields were changed

Broken in abcfcce

Fixes 20059
Copy link
Member

@lukstbit lukstbit left a comment

Choose a reason for hiding this comment

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

Ok.

I noticed that the tag changes are quietly discarded when restoring state:

Add/edit note -> Add a tag(no edits to fields) -> Send to background -> Restore screen -> Both Up and Back quietly close the editor with no dialog

@lukstbit lukstbit added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Second Approval Has one approval, one more approval to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Note Editor: 'Discard Changes' is shown if 'Don't Keep Activities' is activated

2 participants