Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,16 @@ public FileAnnotationViewModel(FileAnnotation annotation) {

private void setupContentProperties(FileAnnotation annotation) {
if (annotation.hasLinkedAnnotation()) {
this.content.set(toNAifEmpty(annotation.getLinkedFileAnnotation().getContent()));
this.content.set(annotation.getLinkedFileAnnotation().getContent());
String annotationContent = annotation.getContent();
String illegibleTextMessage = Localization.lang("The marked area does not contain any legible text!");
this.marking.set(annotationContent.isEmpty() ? illegibleTextMessage : annotationContent);
} else {
this.content.set(toNAifEmpty(annotation.getContent()));
this.marking.set("N/A");
this.content.set(annotation.getContent());
this.marking.set("");
}
}

private static String toNAifEmpty(String content) {
if (content.isEmpty()) {
return "N/A";
}
return content;
}

public String getAuthor() {
return author.get();
}
Expand Down