writefreely-swiftui-multiplatform icon indicating copy to clipboard operation
writefreely-swiftui-multiplatform copied to clipboard

Choosing a new collection in the sidebar when the editor has a new local draft doesn't unset the draft

Open AngeloStavrow opened this issue 3 years ago • 0 comments

Description

When a new local draft is active in the editor, and the user clicks on a different collection in the sidebar, the editor should unset the currently-active post and show a placeholder ("Select a post, or create a new local draft.") in its place.

Steps to Reproduce

  1. Launch the Mac app.
  2. If it doesn't create one automatically, click the new local draft button. Optionally, type something in the new draft.
  3. Click on either the All Posts or Drafts collection in the sidebar —whichever isn't currently selected— to leave this local draft.

Expected

The post editor area should unset the local draft as the active post and show a placeholder:

Screen Shot 2022-08-05 at 9 15 47 AM

Actual

The post editor area keeps the current draft as active, despite the fact that the post object itself may have even been deleted (if it was blank):

Screen Shot 2022-08-05 at 9 17 08 AM

AngeloStavrow avatar Aug 05 '22 13:08 AngeloStavrow