@@ -6,7 +6,7 @@ import {SecurityContext} from '@angular/core';
6
6
import { SettingsService } from '../settings/settings.service' ;
7
7
import { FileService } from '../../../api/files/file.service' ;
8
8
import { Path } from '../../../api/files/path' ;
9
- import { EMPTY , of } from 'rxjs' ;
9
+ import { EMPTY , forkJoin , of } from 'rxjs' ;
10
10
import { Device } from '../../../api/devices/device' ;
11
11
import { WindowDelegate } from '../../window/window-delegate' ;
12
12
import { File } from '../../../api/files/file' ;
@@ -208,7 +208,7 @@ export class DefaultTerminalState extends CommandTerminalState {
208
208
private domSanitizer : DomSanitizer , protected windowDelegate : WindowDelegate , protected activeDevice : Device ,
209
209
protected terminal : TerminalAPI , public promptColor : string | null = null ) {
210
210
super ( ) ;
211
- this . settings . terminalPromptColor . getFresh ( ) . then ( ( ) => this . refreshPrompt ( ) ) ;
211
+ this . settings . terminalPromptColor . getFresh ( ) . subscribe ( ( ) => this . refreshPrompt ( ) ) ;
212
212
}
213
213
214
214
static registerPromptAppenders ( element : HTMLElement ) {
@@ -461,16 +461,16 @@ export class DefaultTerminalState extends CommandTerminalState {
461
461
files . filter ( ( file ) => {
462
462
return file . is_directory ;
463
463
} ) . 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 ] ) => {
466
466
this . terminal . output ( `<span style="color: ${ folderColor } ;">${ lsPrefix ? '[Folder] ' : '' } ${ folder . filename } </span>` ) ;
467
467
} ) ;
468
468
} ) ;
469
469
470
470
files . filter ( ( file ) => {
471
471
return ! file . is_directory ;
472
472
} ) . sort ( ) . forEach ( file => {
473
- this . settings . terminalLsPrefix . get ( ) . then ( lsPrefix =>
473
+ this . settings . terminalLsPrefix . get ( ) . subscribe ( lsPrefix =>
474
474
this . terminal . outputText ( `${ ( lsPrefix ? '[File] ' : '' ) } ${ file . filename } ` )
475
475
) ;
476
476
} ) ;
0 commit comments