Skip to content
Snippets Groups Projects
Commit e6fa867e authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6499 first with filter instead of take

parent 1ab1e247
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ import { ...@@ -32,7 +32,7 @@ import {
UntypedFormGroup, UntypedFormGroup,
} from '@angular/forms'; } from '@angular/forms';
import { ReplyOption } from 'libs/postfach-shared/src/lib/postfach.model'; import { ReplyOption } from 'libs/postfach-shared/src/lib/postfach.model';
import { Observable, take } from 'rxjs'; import { Observable, first } from 'rxjs';
@Injectable() @Injectable()
export class PostfachMailFormservice extends AbstractFormService { export class PostfachMailFormservice extends AbstractFormService {
...@@ -63,11 +63,9 @@ export class PostfachMailFormservice extends AbstractFormService { ...@@ -63,11 +63,9 @@ export class PostfachMailFormservice extends AbstractFormService {
public initMailBody(): void { public initMailBody(): void {
this.postfachService this.postfachService
.getSettings() .getSettings()
.pipe(take(1)) .pipe(first((settings) => !!settings.signatur))
.subscribe((settings: PostfachSettings) => { .subscribe((settings: PostfachSettings) => {
if (settings.signatur) {
this.patchMailBodyWithSignaturAndNewline(settings.signatur); this.patchMailBodyWithSignaturAndNewline(settings.signatur);
}
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment