tarsila icon indicating copy to clipboard operation
tarsila copied to clipboard

Autosave

Open keysym opened this issue 1 year ago • 1 comments

As tarsila panics on errors, an autosave could be great to avoid losing progress.

Should autosave...

  • Overwrite the existing .tarsila OR write to a .tmp/.backup file to recover later in case of a panic?
  • Save on a time interval OR based on user events?

keysym avatar Apr 11 '23 22:04 keysym

Time interval I think would be better, if we decide to save after every edit event it will be too much writing on disc. We can have a const with the interval in milliseconds, so later it can be configurable via config file. I'd prefer it to save to a temp file, it's less intrusive for the user.

We probably need a crate to help finding a cross-platform way of getting a temp directory.

Also creating this ticket to remember to improve our error handling: #33

Let me know if you interested in working on this, so I can mark the ticket as assigned :)

yds12 avatar Apr 12 '23 10:04 yds12