Skip to content

Commit

Permalink
Fix editorial final version in a motion (#3621)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elblinator authored and peb-adr committed Apr 30, 2024
1 parent e854397 commit 561d71b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { UntypedFormControl } from '@angular/forms';
import { ErrorStateMatcher } from '@angular/material/core';
import { MatLegacyMenuTrigger as MatMenuTrigger } from '@angular/material/legacy-menu';
import { TranslateService } from '@ngx-translate/core';
import { combineLatest, Subscription } from 'rxjs';
import { combineLatest, distinctUntilChanged, Subscription, takeUntil, timer } from 'rxjs';
import { ChangeRecoMode, LineNumberingMode } from 'src/app/domain/models/motions/motions.constants';
import { ViewMotion, ViewMotionChangeRecommendation } from 'src/app/site/pages/meetings/pages/motions';
import { ViewPortService } from 'src/app/site/services/view-port.service';
Expand Down Expand Up @@ -310,10 +310,10 @@ export class MotionHighlightFormComponent extends BaseMotionDetailChildComponent
.get(`motions_default_line_numbering`)
.subscribe(mode => this.setLineNumberingMode(mode)),
combineLatest([
this.changeRecoRepo.getViewModelListObservable(),
this.meetingSettingsService.get(`motions_recommendation_text_mode`)
this.changeRecoRepo.getViewModelListObservable().pipe(takeUntil(timer(1000))),
this.meetingSettingsService.get(`motions_recommendation_text_mode`).pipe(distinctUntilChanged())
]).subscribe(([_, mode]) => {
if (mode) {
if (!this.isEditingFinalVersion && mode) {
this.setChangeRecoMode(this.determineCrMode(mode as ChangeRecoMode));
}
})
Expand Down

0 comments on commit 561d71b

Please sign in to comment.