Automattic / simplenote-ios

Simplenote for iOS
https://simplenote.com
GNU General Public License v2.0
2.02k stars 281 forks source link

New note widget lock screen #1564

Closed charliescheer closed 1 month ago

charliescheer commented 1 month ago

Fix

So this one is a little odd... but, if you are using the New Note Widget and you have passcode enabled, it is possible to tap on the widget, and then not enter your passcode before leaving SN. If you follow those steps then a note is created and the editor is presented even though you never actually unlocked the app.

We shouldn't be making changes to the app's content if the app has not been unlocked. So in this PR I have deferred the creation of new notes from the new note widget until after the user has unlocked the app. As a bonus, during testing I realized the same problem would have occurred using shortcuts, and this fixes that too.

fixes #1444

Test

  1. In simplenote, go to settings > Passcode and add a passcode (this fix works for biometrics as well, but it is easier to test with just a passcode
  2. make sure Simplenote is on the note list
  3. Go to the iOS Home Screen and add the New Note Widget for Simplenote.
  4. Tap on it, the app will launch to the Lock Screen. Enter your passcode and confirm that you are in the editor in a new note. Dismiss this note
  5. Put Simplenote into the background, tap on the new note widget again. When the passcode screen appears, don't enter your passcode, instead swipe up to put Simplenote in the background
  6. Now using the app switcher select Simplenote. This will put you back on the Lock Screen.
  7. Enter your password and confirm that you do NOT end up in the editor with a new note.

Review

(Required) Add instructions for reviewers. For example:

Only one developer is required to review these changes, but anyone can perform the review.

Release

(Required) Add a concise statement to RELEASE-NOTES.txt if the changes should be included in release notes. Include details about updating the notes in this section. For example:

RELEASE-NOTES.txt was updated in 0dba22 with:

  • Fixed an issue where using the new note widget with the lock screen could create empty notes while the app was locked
wpmobilebot commented 1 month ago
You can test the changes in simplenote-ios from this Pull Request by: If you need access to App Center, please ask a maintainer to add you.