Modified AutoSaveViewModel.needsSaving() to not reset the timer if already counting down. This ensures the timer starts when the user begins typing and continues counting even if they keep typing continuously, leading to auto-save every few seconds instead of waiting for the user to stop typing. Added automated tests for the new behavior. Fixes the issue where drafts would only save after user stops typing, potentially leading to data loss if the app is closed too quickly. Closes: https://github.com/damus-io/damus/issues/3164 Changelog-Changed: Improved draft saving feature to prevent data loss if app closes too quickly Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
3.6 KiB
3.6 KiB