added handlers for handling channels for storeDocs, listDocs and retrieveDoc
storeDoc (project, doc, remoteSeq) stringifies doc and stores each in filename safe version of {`/docs/{project}/{remote-seq}|local-doc{modDate}{id}{creator}{modBy}
for filesafety, if a filename becomes over 255 characters, we switch to a shorter convention for storing ids, so that times are separated by hyphens without the date part
listDocs (project, isFromRemote) gives list of remote or local filenames. For local docs it starts with the most recent modDates and gets a list of the remote docs and will stop when it finds a corresponding remoteDoc.
Remote seq is padded to 9 zeros and local-doc is 9 characters to make it trivial to find corresponding remoteDoc match to local-doc. (Otherwise, we'd need to also match on an abbreviated format for remoteDoc just in case).
retrieveDoc (project, isFromRemote, filename) returns the doc according to the filename
What particularly has changed?
bumped version to 205300.0.23-alpha1 (2.53.0 / 0.23)
With the internet on, go to Settings > Debug > Clear local database
This will re-download all the changes from the remote database and will store a copy of each in %AppData%/sltt-app/persistentStorage/docs/remote
Now disconnect from the internet
Make a couple of simple text changes (add a text note). Expect those changes to show up in %AppData%/sltt-app/persistentStorage/docs/local
While offline, go to Settings > Debug > Clear local database
Wait until the app loads and verify the recent offline changes are still there
What issue(s) is this trying to resolve?
How does it all work?
storeDocs
,listDocs
andretrieveDoc
storeDoc
(project, doc, remoteSeq) stringifies doc and stores each in filename safe version of {`/docs/{project}/{remote-seq}|local-doc{modDate}{id}{creator}{modBy}listDocs
(project, isFromRemote) gives list of remote or local filenames. For local docs it starts with the most recent modDates and gets a list of the remote docs and will stop when it finds a corresponding remoteDoc.local-doc
is 9 characters to make it trivial to find corresponding remoteDoc match to local-doc. (Otherwise, we'd need to also match on an abbreviated format for remoteDoc just in case).retrieveDoc
(project, isFromRemote, filename) returns the doc according to the filenameWhat particularly has changed?
205300.0.23-alpha1
(2.53.0 / 0.23)Steps for testing
%AppData%/sltt-app/persistentStorage/docs/remote
%AppData%/sltt-app/persistentStorage/docs/local
https://github.com/ubsicap/sltt-app/assets/1125565/d646e3c1-9ac9-41d6-92eb-2aee03290b8c
ticket: https://github.com/ubsicap/sltt-app/issues/13 commit-convention: https://www.conventionalcommits.org/en/v1.0.0/