Closed djplaner closed 1 year ago
Initial thought is to do this in the editOnController as part of turning the edit lock on.
Most of it is there at the moment. The challenge is the long chain of disconnected functions. In particular, the chain associated with turnEditOff
. Most of this is working, having deleted the file. But we get to finalCheckForEditOnOff
and it's coded to call finishCallBack
- when it should not do that
Should it
Mabye have to set a private member to distinguish.
checkCreation
- similar to checkEditingDetailsIF we simply set editon status to NO_ONE_EDITING the normal turn edit on process will
When I am the user with a stale edit lock. Need to detect and tell me about it and modify the interface ASAP.
WHen should/could it be done?
What might it look like
What should it do
toggleEditingOn
- set the timeLockObtained valuetoggleEditingOff
- reset the timeLockObtained valuesetSaveInterval
onMount
but that doesn't get called when a suspended computer comes onAppears that turnEditOff doesn't care if you don't own the current edit file NO
reload the page object
if it's our details - remove it
if it's not our details - fail - but allow the browser to turn off the editing option
turnEditOff
Implemented this
createEditingOnPage -> async postData
finalCheckForeditOnOff
checkDeletion
The pure turn on and off is working fine. It is the way in which stale lock is detected (by the different actors) and what happens where the problem occurs
This check for staleEditLock is causing some disruption. -- this check should be done outside???
Question is where does this check need to be done
The nuts and bolts of turnEditOn/Off is happening, but the higher level - esp. for holder of stale lock - is not happening.
Where is the saving done
startSaveCollections - calls isStaleEditLock
It is working here - not being able to save and getting repeated errors - but that's because we're not correctly remove it
Working - but the turningEditOff is removing the edit lock when it is owned by someone else...not what we want here
For various reasons there may be a stale edit lock hanging around.
onMount
or as part of turn edit lock onCurrent design