Bugfix: change detection for change recommendations
This commit is contained in:
parent
f15cb4d42e
commit
058d87eb77
@ -111,7 +111,7 @@
|
||||
<button
|
||||
type="button"
|
||||
mat-menu-item
|
||||
[disabled]="hasCollissions(change)"
|
||||
[disabled]="hasCollissions(change, changes)"
|
||||
(click)="setAcceptanceValue(change, 'accepted')"
|
||||
>
|
||||
<mat-icon>thumb_up</mat-icon>
|
||||
@ -121,7 +121,7 @@
|
||||
<button
|
||||
type="button"
|
||||
mat-menu-item
|
||||
[disabled]="hasCollissions(change)"
|
||||
[disabled]="hasCollissions(change, changes)"
|
||||
(click)="setAcceptanceValue(change, 'rejected')"
|
||||
>
|
||||
<mat-icon>thumb_down</mat-icon>
|
||||
|
@ -101,11 +101,13 @@ export class MotionDetailDiffComponent extends BaseViewComponent implements Afte
|
||||
return (
|
||||
changes.filter((otherChange: ViewUnifiedChange) => {
|
||||
return (
|
||||
(otherChange.getChangeId() === change.getChangeId() &&
|
||||
(otherChange.getLineFrom() >= change.getLineFrom() &&
|
||||
otherChange.getLineFrom() < change.getLineTo())) ||
|
||||
(otherChange.getLineTo() > change.getLineFrom() && otherChange.getLineTo() <= change.getLineTo()) ||
|
||||
(otherChange.getLineFrom() < change.getLineFrom() && otherChange.getLineTo() > change.getLineTo())
|
||||
otherChange.getChangeId() !== change.getChangeId() &&
|
||||
((otherChange.getLineFrom() >= change.getLineFrom() &&
|
||||
otherChange.getLineFrom() < change.getLineTo()) ||
|
||||
(otherChange.getLineTo() > change.getLineFrom() &&
|
||||
otherChange.getLineTo() <= change.getLineTo()) ||
|
||||
(otherChange.getLineFrom() < change.getLineFrom() &&
|
||||
otherChange.getLineTo() > change.getLineTo()))
|
||||
);
|
||||
}).length > 0
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user