joplin icon indicating copy to clipboard operation
joplin copied to clipboard

Mobile: Warn user when trying to delete a Inbox folder

Open pedr opened this issue 1 year ago • 0 comments

Related to feature https://github.com/laurent22/joplin/issues/8459

Changes the warning message when trying to delete a Inbox Folder

Screenshot from 2023-07-12 19-18-36

Functionality:

I'm adding a new function to lib/utils/inboxFolderFetcher.ts that will make a request to Joplin Cloud server if the sync target is set to Joplin Cloud.

The function will be called on 30 seconds after initialization and once every 1 hour.

The request will fetch the Inbox folder jop_id that will be used when the user tries to delete a folder to check if the folder that is being deleted is the Inbox one. If it is, we change the warning message to make it clear to the user what may happen if the deletion happens.

Testing:

  • Requests should only happen if the Joplin Cloud sync target is selected.
  • One request should be sent after 10s of starting the desktop application if Joplin Cloud sync target is selected.
  • When trying to delete the Inbox folder the user should see the inbox warning.
  • When trying to delete any other type of folder the user should see the generic warning.

Inbox Warning

Delete the Inbox notebook?

If you delete the inbox notebook, any email that's recently been sent to it may be lost.

Generic Warning

Delete notebook "${folder.name}"?

All notes and sub-notebooks within this notebook will also be deleted.

pedr avatar Jul 12 '23 22:07 pedr