Closed Simon-Laux closed 2 years ago
I'd like to understand this a bit better in relationship to the use of localstorage and such.
Are updates always replayed entirely each time an application is opened, even if it's been opened before? What use is localstorage in this case?
Are updates always replayed entirely each time an application is opened, even if it's been opened before?
webxdc's can control which updates they receive by passing a "last known serial" to setUpdateListener().
by default, the last known serial is "0", which means that webxdc get all updates ever received.
however, an webxdc can also accumulate its state, save it in localStorage together with "last known serial" and only request new updates next time (by reading "last known serial" from localStorage and pass that to setUpdateListener())
It is more clear to me n, thanks! I have done a rework in version 0.3.1 that should have much better behavior concerning all this. Hopefully this time I got it right!
expected: app has all previous state updates, even if the update was sent before the instance was opened/started actual: app only has updates from the time it was active, and on reload it looses all state.