annotation: if comment is not initialised its not in editing mode

this caused problem when new doc is loading and we are settings up comments,
but they are not initialised and marked as being in editing.
i.e: this will cause problem with showing reply count(in collapsed view) initially

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ia688ca0bfc37dd925bd74dc5826d43fdb37c81db
This commit is contained in:
Pranam Lashkari 2023-12-24 01:29:01 +05:30 committed by Pranam Lashkari
parent 5979eb9a1f
commit 1bd26addd1

View file

@ -967,8 +967,8 @@ export class Comment extends CanvasSectionObject {
}
public isEdit (): boolean {
return (this.sectionProperties.nodeModify && this.sectionProperties.nodeModify.style.display !== 'none') ||
(this.sectionProperties.nodeReply && this.sectionProperties.nodeReply.style.display !== 'none');
return !this.pendingInit && ((this.sectionProperties.nodeModify && this.sectionProperties.nodeModify.style.display !== 'none') ||
(this.sectionProperties.nodeReply && this.sectionProperties.nodeReply.style.display !== 'none'));
}
public static isAnyEdit (): boolean {