File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,7 @@ export const ElectronSettings = observer(
6161      this . handleStateChange  =  this . handleStateChange . bind ( this ) ; 
6262
6363      this . state  =  { 
64-         activeVersions : new  Set < string > ( [ 
65-           props . appState . getVersionLockName ( props . appState . version ) , 
66-         ] ) , 
64+         activeVersions : new  Set < string > ( [ props . appState . version ] ) , 
6765        isDownloadingAll : false , 
6866        isDeletingAll : false , 
6967      } ; 
@@ -428,7 +426,7 @@ export const ElectronSettings = observer(
428426          break ; 
429427      } 
430428
431-       if  ( this . state . activeVersions . has ( appState . getVersionLockName ( version ) ) )  { 
429+       if  ( this . state . activeVersions . has ( version ) )  { 
432430        return  ( 
433431          < Tooltip 
434432            position = "auto" 
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ export class AppState {
215215
216216  private  static  versionLockNamePrefix  =  'version:' ; 
217217
218-   public  getVersionLockName ( ver : string )  { 
218+   private  getVersionLockName ( ver : string )  { 
219219    return  `${ AppState . versionLockNamePrefix } ${ ver }  ` ; 
220220  } 
221221
@@ -226,7 +226,7 @@ export class AppState {
226226    return  ( ( await  navigator . locks . query ( ) ) . held  ||  [ ] ) . reduce < Set < string > > ( 
227227      ( acc ,  item )  =>  { 
228228        if  ( item . name ?. startsWith ( AppState . versionLockNamePrefix ) )  { 
229-           acc . add ( item . name ) ; 
229+           acc . add ( item . name . split ( AppState . versionLockNamePrefix ) [ 1 ] ) ; 
230230        } 
231231
232232        return  acc ; 
@@ -730,7 +730,7 @@ export class AppState {
730730
731731    const  activeVersions  =  await  this . getActiveVersions ( ) ; 
732732
733-     if  ( activeVersions . has ( this . getVersionLockName ( ver . version ) ) )  { 
733+     if  ( activeVersions . has ( ver . version ) )  { 
734734      console . log ( `State: Not removing active version ${ version }  ` ) ; 
735735      return ; 
736736    } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments