jonogon / jonogon-mono

Take Action on Issues you care about
MIT License
36 stars 34 forks source link

Fix submit new dabi flow with deleted draft and broken ui for no petitions #74

Closed imas234 closed 2 months ago

imas234 commented 2 months ago

Broken UI for no petition

In the newly introduced animation of reordering petitions, the assumption was that there would always be petitions to swap between, which resulted in null values being inserted into the petition array by default when the array was empty or did not have enough items to swap.

Fix: check for array size before initiating swap

Broken submit dabi when there is a soft deleted draft present

Submit dabi would break after soft deleting an existing draft as it would try to edit and submit that one draft on every subsequent retry when clicking submit dabi

Fix: when checking for existing drafts filter our soft deleted ones

Misc

imas234 commented 2 months ago

probably also fixes issue #73