I don't have the real core code in mind, but as far as I can remember. ....
On Tuesday, July 14, 2020 at 7:32:55 AM UTC+2, TonyM wrote: *Why;* > > Current Example: If I am building a package and I export the content say > to a json file or plugin package, I would like to reset the change count > because this indicates the tiddlers no longer need saving because they have > being saved via an export. > The changecount element is essential for the TW saver and UI update handling. ... IMO you want to misusing this element. Exporting 2 out of 3 tiddlers would mean you loose 1 or all 3 tiddlers. Eg: I open a TW. ... I create 3 tiddlers ... I do export 2 of them. ... Export clears changecount (and dirty-flag <https://tiddlywiki.com/#SavingMechanism>) ... I do a page reload. ... I physically lost 1 tiddler. ... What if creating this tiddler took me 3 hours? ... I would be really disappointed. > One strong use case it if a user is on a readonly wiki, such as where they > do not have a suitable saver or access to save, eg github hosted/php hosted > etc.. then they could fill out a survey. Once they export their survey > answers, the they are not longer "unsaved" changes, I can reset the dirty > indicator and they can leave the site without a warning, until then the > dirty indicator will protect them from leaving the site before their > changes are saved/exported. > Creating a wiki, that will never set the dirty-flag is simple. Edit the https://tiddlywiki.com/#%24%3A%2Fconfig%2FSaverFilter tiddler and make the text field empty. Manually save the wiki and you are done. > A similar method may be used if the package of tiddlers are sent as an > attachment by email (which I am yet to build) > > *Possible issue* > > - I am not sure if the local storage plugin relies on this same > mechanism? However this could be a way to clear the dirty indicator for > items saved in local storage. > > It's a saving mechanism. If you say it shouldn't save, it doesn't. > > - Will this disrupt the save mechanisms? > > Yes. Internally there is a function that is called: .wiki.getChangeCount(title), which is used in 12 different core modules. They are all saver and syncer related. ... So changing it "hard core" will deffinitely have unknown side effects. ... Especially since the status is "synced" between 2 different tiddler memory "stores". As I wrote, it will take much more time to see the side effects. ... I think you'll need something extremely application specific, which can best be accomplished with a plugin to start off. -mario -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/24d7217b-ea0f-47d7-8e73-f60af94e6252o%40googlegroups.com.
