File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
frontend/javascripts/viewer/model/sagas/saving Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ const MUTEX_ACQUIRED_KEY = "AnnotationMutexAcquired";
1919const RETRY_COUNT = 12 ;
2020const ACQUIRE_MUTEX_INTERVAL = 1000 * 60 ;
2121
22+ // todop
23+ const DISABLE_EAGER_MUTEX_ACQUISITION = true ;
24+
2225type MutexLogicState = {
2326 isInitialRequest : boolean ;
2427 doesHaveMutexFromBeginning : boolean ;
@@ -27,9 +30,10 @@ type MutexLogicState = {
2730} ;
2831
2932export function * acquireAnnotationMutexMaybe ( ) : Saga < void > {
30- // todop
31- return ;
3233 yield * call ( ensureWkReady ) ;
34+ if ( DISABLE_EAGER_MUTEX_ACQUISITION ) {
35+ return ;
36+ }
3337 const allowUpdate = yield * select ( ( state ) => state . annotation . restrictions . allowUpdate ) ;
3438 if ( ! allowUpdate ) {
3539 return ;
@@ -133,7 +137,7 @@ function onMutexStateChanged(
133137 blockedByUser : APIUserCompact | null | undefined ,
134138) {
135139 if ( canEdit ) {
136- Toast . close ( "MutexCouldNotBeAcquired" ) ;
140+ Toast . close ( MUTEX_NOT_ACQUIRED_KEY ) ;
137141 if ( ! isInitialRequest ) {
138142 const message = (
139143 < React . Fragment >
You can’t perform that action at this time.
0 commit comments