annotation: remove redundant condition

it did not make sense to check for selection if we are unselecting before selecting

problem:
when already selected comment try to modify,
it will not rearrange replies in the thread this caused
overlapping of the comments and bad user experience

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I276c34301b45951a7051018770e21b4970603861
This commit is contained in:
Pranam Lashkari 2023-12-25 17:13:28 +05:30 committed by Gökay ŞATIR
parent 4ee246a336
commit fbf22535a0

View file

@ -633,7 +633,7 @@ export class CommentSection extends CanvasSectionObject {
}.bind(this), /* isMod */ true);
}
else {
if (this.sectionProperties.docLayer._docType !== 'spreadsheet' && this.sectionProperties.selectedComment !== annotation) {
if (this.sectionProperties.docLayer._docType !== 'spreadsheet') {
this.unselect();
this.select(annotation);
}