tauri-apps / tauri-apps/plugins-workspace

[docs] Add more documentation as well as behaviour

Open
#14 1 comment 2 reactions 0 assignees View on GitHub
plugin: store type: documentation v1
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

The docs is not clear that data is written to storage only on close. When I ctrl + C a debug instance, the data does not get saved. What if the user uses Task manager to close the app? What if the user's computer shuts down randomly? I suggest the following functionality:

onSet:
- Update data in queue and tell rust what to update
- On rust side, write in a fail safe way. That is
Rename `filename.dat` to `bak/filename.data.bak`
Write to `filename.dat`
- On first load, if `filename.dat` fails, try reading from `bak/filename.data.bak`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.