File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/app/shared/components/addons/storage-item-selector Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import { InputText } from 'primeng/inputtext';
1010import { RadioButton } from 'primeng/radiobutton' ;
1111import { Skeleton } from 'primeng/skeleton' ;
1212
13+ import { timer } from 'rxjs' ;
14+
1315import {
1416 ChangeDetectionStrategy ,
1517 Component ,
@@ -240,9 +242,9 @@ export class StorageItemSelectorComponent implements OnInit {
240242 this . selectedStorageItem . set ( folder ) ;
241243 this . hasFolderChanged . set ( folder ?. itemId !== this . initiallySelectedStorageItem ( ) ?. itemId ) ;
242244 if ( this . isGoogleFilePicker ( ) ) {
243- setTimeout ( ( ) => {
244- this . addFilesPicker ( ) ?. createPicker ( ) ;
245- } , 1000 ) ;
245+ timer ( 1000 )
246+ . pipe ( takeUntilDestroyed ( this . destroyRef ) )
247+ . subscribe ( ( ) => this . addFilesPicker ( ) ?. createPicker ( ) ) ;
246248 }
247249 } ;
248250
You can’t perform that action at this time.
0 commit comments