post_status_form: enable sync flush for watcher #414

Open
novenary wants to merge 1 commit from novenary/akkoma-fe:sticky-drafts into develop

1 commit

Author SHA1 Message Date
novenary
ef242a1ddd post_status_form: enable sync flush for watcher
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
This fixes drafts not clearing after posting a reply.

Vue 3.3.11 changed watchers to stop firing after component unmount.
After posting a reply, the post form is removed, now causing the queued
event to be discarded.
Synchronous flush causes the handler to be called immediately when
changes happen, solving the problem.

The performance impact of this change seems non-existent. Even before,
typing would generate an event for each keystroke. Pasting is atomic.

See: https://github.com/vuejs/core/pull/7181
See: 80e2128d52
Fixes: a7dea2f70f
Fixes: #413
2024-10-15 00:16:45 +03:00