diff --git a/src/tools/lupdate.ts b/src/tools/lupdate.ts index e55fa42..0fa8038 100644 --- a/src/tools/lupdate.ts +++ b/src/tools/lupdate.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import { iif } from 'rxjs'; +import { EMPTY, iif } from 'rxjs'; import { mergeMap, switchMap } from 'rxjs/operators'; import * as vscode from 'vscode'; import { @@ -55,7 +55,7 @@ const uiFileWatcher$ = createFileWatcher$('**/*.ui'); export const liveExecution$ = enabled$('lupdate').pipe( switchMap(enabled => - iif(() => enabled, uiFileWatcher$.pipe(watchFileChangedAndCreated())) + iif(() => enabled, uiFileWatcher$.pipe(watchFileChangedAndCreated()), EMPTY) ), mergeMap(uri => updateTranslation(uri)) ); diff --git a/src/tools/rcc.ts b/src/tools/rcc.ts index e8a9965..08dbde7 100644 --- a/src/tools/rcc.ts +++ b/src/tools/rcc.ts @@ -1,4 +1,4 @@ -import { iif } from 'rxjs'; +import { EMPTY, iif } from 'rxjs'; import { mergeMap, switchMap } from 'rxjs/operators'; import * as vscode from 'vscode'; import { @@ -33,9 +33,13 @@ export async function compileResource(fileUri?: vscode.Uri) { const qrcFileWatcher$ = createFileWatcher$('**/*.qrc'); -export const liveExecution$ = enabled$('uic').pipe( +export const liveExecution$ = enabled$('rcc').pipe( switchMap(enabled => - iif(() => enabled, qrcFileWatcher$.pipe(watchFileChangedAndCreated())) + iif( + () => enabled, + qrcFileWatcher$.pipe(watchFileChangedAndCreated()), + EMPTY + ) ), mergeMap(uri => compileResource(uri)) ); diff --git a/src/tools/uic.ts b/src/tools/uic.ts index 6a222b0..2551828 100644 --- a/src/tools/uic.ts +++ b/src/tools/uic.ts @@ -1,4 +1,4 @@ -import { iif } from 'rxjs'; +import { EMPTY, iif } from 'rxjs'; import { mergeMap, switchMap } from 'rxjs/operators'; import * as vscode from 'vscode'; import { @@ -34,7 +34,7 @@ const uiFileWatcher$ = createFileWatcher$('**/*.ui'); export const liveExecution$ = enabled$('uic').pipe( switchMap(enabled => - iif(() => enabled, uiFileWatcher$.pipe(watchFileChangedAndCreated())) + iif(() => enabled, uiFileWatcher$.pipe(watchFileChangedAndCreated()), EMPTY) ), mergeMap(uri => compileForm(uri)) );