Merge pull request #5006 from CatoTH/dont-include-amendments-in-changed-view
Don't include amendments into changed view
This commit is contained in:
commit
38cb75487b
@ -17,7 +17,7 @@ import { TreeIdNode } from 'app/core/ui-services/tree.service';
|
||||
import { Motion } from 'app/shared/models/motions/motion';
|
||||
import { MotionPoll } from 'app/shared/models/motions/motion-poll';
|
||||
import { Submitter } from 'app/shared/models/motions/submitter';
|
||||
import { ViewUnifiedChange } from 'app/shared/models/motions/view-unified-change';
|
||||
import { ViewUnifiedChange, ViewUnifiedChangeType } from 'app/shared/models/motions/view-unified-change';
|
||||
import { PersonalNoteContent } from 'app/shared/models/users/personal-note';
|
||||
import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
|
||||
import { ViewCategory } from 'app/site/motions/models/view-category';
|
||||
@ -577,7 +577,15 @@ export class MotionRepositoryService extends BaseIsAgendaItemAndListOfSpeakersCo
|
||||
case ChangeRecoMode.Original:
|
||||
return this.lineNumbering.insertLineNumbers(targetMotion.text, lineLength, highlightLine);
|
||||
case ChangeRecoMode.Changed:
|
||||
return this.diff.getTextWithChanges(targetMotion.text, changes, lineLength, highlightLine);
|
||||
const changeRecommendations = changes.filter(
|
||||
change => change.getChangeType() === ViewUnifiedChangeType.TYPE_CHANGE_RECOMMENDATION
|
||||
);
|
||||
return this.diff.getTextWithChanges(
|
||||
targetMotion.text,
|
||||
changeRecommendations,
|
||||
lineLength,
|
||||
highlightLine
|
||||
);
|
||||
case ChangeRecoMode.Diff:
|
||||
let text = '';
|
||||
const changesToShow = changes.filter(change => {
|
||||
|
@ -8,7 +8,7 @@ import { ChangeRecommendationRepositoryService } from 'app/core/repositories/mot
|
||||
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
|
||||
import { DiffLinesInParagraph, DiffService, LineRange } from 'app/core/ui-services/diff.service';
|
||||
import { LinenumberingService } from 'app/core/ui-services/linenumbering.service';
|
||||
import { ViewUnifiedChange } from 'app/shared/models/motions/view-unified-change';
|
||||
import { ViewUnifiedChange, ViewUnifiedChangeType } from 'app/shared/models/motions/view-unified-change';
|
||||
import { ChangeRecoMode, LineNumberingMode, MotionTitleInformation } from 'app/site/motions/models/view-motion';
|
||||
import { IBaseScaleScrollSlideComponent } from 'app/slides/base-scale-scroll-slide-component';
|
||||
import { BaseMotionSlideComponent } from '../base/base-motion-slide';
|
||||
@ -331,9 +331,12 @@ export class MotionSlideComponent extends BaseMotionSlideComponent<MotionSlideDa
|
||||
case ChangeRecoMode.Original:
|
||||
return this.lineNumbering.insertLineNumbers(motion.text, this.lineLength, this.highlightedLine);
|
||||
case ChangeRecoMode.Changed:
|
||||
const changeRecommendations = this.getAllTextChangingObjects().filter(
|
||||
change => change.getChangeType() === ViewUnifiedChangeType.TYPE_CHANGE_RECOMMENDATION
|
||||
);
|
||||
return this.diff.getTextWithChanges(
|
||||
motion.text,
|
||||
this.getAllTextChangingObjects(),
|
||||
changeRecommendations,
|
||||
this.lineLength,
|
||||
this.highlightedLine
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user