File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed
packages/backend/src/managers Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -73,14 +73,21 @@ export class ServicesManager {
7373 }
7474 } ) ;
7575 this . extensionContext . subscriptions . push ( disposable ) ;
76+ podmanDesktopApi . provider . onDidRegisterContainerConnection ( async ( ) => {
77+ this . loadContainers ( undefined ) . catch ( ( err : unknown ) => {
78+ console . debug ( 'initial load containers' , err ) ;
79+ } ) ;
80+ } ) ;
81+ podmanDesktopApi . provider . onDidUnregisterContainerConnection ( async ( ) => {
82+ this . loadContainers ( undefined ) . catch ( ( err : unknown ) => {
83+ console . debug ( 'initial load containers' , err ) ;
84+ } ) ;
85+ } ) ;
7686 podmanDesktopApi . provider . onDidUpdateContainerConnection ( async e => {
77- if ( e . status === 'started' ) {
78- // remove timeout when https://github.com/podman-desktop/podman-desktop/issues/10319 is fixed
79- setTimeout ( ( ) => {
80- this . loadContainers ( undefined ) . catch ( ( err : unknown ) => {
81- console . debug ( 'initial load containers' , err ) ;
82- } ) ;
83- } , 5_000 ) ;
87+ if ( e . status === 'started' || e . status === 'stopped' ) {
88+ this . loadContainers ( undefined ) . catch ( ( err : unknown ) => {
89+ console . debug ( 'initial load containers' , err ) ;
90+ } ) ;
8491 }
8592 } ) ;
8693 try {
You can’t perform that action at this time.
0 commit comments