martinstoeckli / SilentNotes

SilentNotes is a simple note taking app which respects your privacy.
https://www.martinstoeckli.ch/silentnotes
Mozilla Public License 2.0
238 stars 35 forks source link

Empty note when editing before synchronization finished #247

Closed martinstoeckli closed 4 months ago

martinstoeckli commented 4 months ago

A user reported a bug, when editing a note before the synchronization has finished.

Reproduction steps

  1. Create a note and synchronize it between 2 devices (A & B).
  2. Modify note on device A and sync.
  3. Open the note on device B and immediately begin writing (press repeatedly "autocomplete" on the Microsoft keyboard) until the message appears that the synchronization was successfully completed.
  4. Change the device and repeat step 3.
  5. Repeat step 4 and after swapping 1-3 times, the content of the note gets empty and is lost.

Platform

martinstoeckli commented 4 months ago

Unfortunately I could not reproduce this issue in the dev environment, nor on other devices. Probably it is related to the exact timing of the parallel tasks "synchronization", "loading of user interface" and "refresh of the user interface". To avoid this possible problem, the editor is now kept in readonly mode, as long as the startup synchronization is running.

martinstoeckli commented 4 months ago

Fixed in version 7.3.3

martinstoeckli commented 4 months ago

Since I got a comment from another Android user, which encountered the same problem even with version 7.3.3, I decided to finally publish the next major version 8.0.0. This version is a port to another technology base (Blazor/Hybrid) which interacts differently with the ProseMirror-Editor, and to be on the safe side, storing of empty notes will be prevented.