File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/renderer/model/sources Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,12 @@ export const lockedTracker = (source, store) => {
12
12
const unlocked = key => ! keySet . has ( key )
13
13
14
14
; ( async ( ) => {
15
- store . on ( 'batch' , ( { operations } ) => {
15
+ store . on ( 'batch' , async ( { operations } ) => {
16
16
const candidates = operations
17
- . filter ( ( { key } ) => ID . isLockedId ( key ) )
17
+ . filter ( ( { key } ) => ( ID . isLockedId ( key ) || ID . isRestrictedId ( key ) ) )
18
18
. map ( ( { type, key } ) => ( { type, key : ID . associatedId ( key ) } ) )
19
19
20
+
20
21
const [ additions , removals ] = R . partition ( ( { type } ) => type === 'put' , candidates )
21
22
additions . forEach ( ( { key } ) => keySet . add ( key ) )
22
23
removals . forEach ( ( { key } ) => keySet . delete ( key ) )
@@ -25,7 +26,9 @@ export const lockedTracker = (source, store) => {
25
26
source . dispatchEvent ( new TouchFeaturesEvent ( keys ) )
26
27
} )
27
28
28
- const keys = await store . keys ( ID . lockedId ( ) )
29
+ const lockedKeys = await store . keys ( ID . lockedId ( ) )
30
+ const restrictedKeys = await store . keys ( ID . restrictedId ( ) )
31
+ const keys = [ ...lockedKeys , ...restrictedKeys ]
29
32
keys . forEach ( key => keySet . add ( ID . associatedId ( key ) ) )
30
33
} ) ( )
31
34
You can’t perform that action at this time.
0 commit comments