@@ -6,7 +6,7 @@ import {SecurityContext} from '@angular/core';
66import { SettingsService } from '../settings/settings.service' ;
77import { FileService } from '../../../api/files/file.service' ;
88import { Path } from '../../../api/files/path' ;
9- import { EMPTY , of } from 'rxjs' ;
9+ import { EMPTY , forkJoin , of } from 'rxjs' ;
1010import { Device } from '../../../api/devices/device' ;
1111import { WindowDelegate } from '../../window/window-delegate' ;
1212import { File } from '../../../api/files/file' ;
@@ -208,7 +208,7 @@ export class DefaultTerminalState extends CommandTerminalState {
208208 private domSanitizer : DomSanitizer , protected windowDelegate : WindowDelegate , protected activeDevice : Device ,
209209 protected terminal : TerminalAPI , public promptColor : string | null = null ) {
210210 super ( ) ;
211- this . settings . terminalPromptColor . getFresh ( ) . then ( ( ) => this . refreshPrompt ( ) ) ;
211+ this . settings . terminalPromptColor . getFresh ( ) . subscribe ( ( ) => this . refreshPrompt ( ) ) ;
212212 }
213213
214214 static registerPromptAppenders ( element : HTMLElement ) {
@@ -461,16 +461,16 @@ export class DefaultTerminalState extends CommandTerminalState {
461461 files . filter ( ( file ) => {
462462 return file . is_directory ;
463463 } ) . sort ( ) . forEach ( folder => {
464- Promise . all ( [ this . settings . terminalLsFolderColor . get ( ) , this . settings . terminalLsPrefix . get ( ) ] )
465- . then ( ( [ folderColor , lsPrefix ] ) => {
464+ forkJoin ( [ this . settings . terminalLsFolderColor . get ( ) , this . settings . terminalLsPrefix . get ( ) ] )
465+ . subscribe ( ( [ folderColor , lsPrefix ] ) => {
466466 this . terminal . output ( `<span style="color: ${ folderColor } ;">${ lsPrefix ? '[Folder] ' : '' } ${ folder . filename } </span>` ) ;
467467 } ) ;
468468 } ) ;
469469
470470 files . filter ( ( file ) => {
471471 return ! file . is_directory ;
472472 } ) . sort ( ) . forEach ( file => {
473- this . settings . terminalLsPrefix . get ( ) . then ( lsPrefix =>
473+ this . settings . terminalLsPrefix . get ( ) . subscribe ( lsPrefix =>
474474 this . terminal . outputText ( `${ ( lsPrefix ? '[File] ' : '' ) } ${ file . filename } ` )
475475 ) ;
476476 } ) ;
0 commit comments