From 936c1e8fe3805cbbda4b332937d0749e2147d18f Mon Sep 17 00:00:00 2001 From: orlinmalkja Date: Tue, 5 Nov 2024 16:01:04 +0100 Subject: [PATCH] fix: change the logic of showing the message box in annotations list --- .../annotations/variants/VariantsList.vue | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/components/annotations/variants/VariantsList.vue b/src/components/annotations/variants/VariantsList.vue index 3878280d..d910b26a 100644 --- a/src/components/annotations/variants/VariantsList.vue +++ b/src/components/annotations/variants/VariantsList.vue @@ -67,23 +67,21 @@ function getWitnessColor(witness: string) { } function getVariantsListInfoMessage(): string { - if (annotationStore.filteredAnnotations.length === 0) { - return i18n[lang.value]['no_annotations_in_view'] - } - if (annotationStore.isSingleSelectMode) { + if (annotationStore.isSingleSelectMode + && annotationStore.filteredAnnotations.length > 0) { return i18n[lang.value]['single_select_mode_info_message'] } + return i18n[lang.value]['no_annotations_in_view'] } function getVariantsListInfoTitle(): string { - if (annotationStore.filteredAnnotations.length === 0) { - return i18n[lang.value]['no_annotations_available'] - } - if (annotationStore.isSingleSelectMode) { + if (annotationStore.isSingleSelectMode + && annotationStore.filteredAnnotations.length > 0) { return i18n[lang.value]['single_select_mode'] } + return i18n[lang.value]['no_annotations_available'] } - + function showLineSeparator(visibleAnnotations, i) { if (visibleAnnotations[i+1]) {