From 0b826612e93c0b120f99b6927c57c13b60c2835f Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sun, 11 Jun 2023 11:50:35 +0200 Subject: [PATCH] Fix: show tags that will be applied if setting is 'full' --- Logic/State/UserRelatedState.ts | 3 ++- UI/Popup/TagRendering/TagRenderingQuestion.svelte | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Logic/State/UserRelatedState.ts b/Logic/State/UserRelatedState.ts index b214c70a4..703242c59 100644 --- a/Logic/State/UserRelatedState.ts +++ b/Logic/State/UserRelatedState.ts @@ -34,7 +34,8 @@ export default class UserRelatedState { public readonly mangroveIdentity: MangroveIdentity public readonly installedUserThemes: Store public readonly showAllQuestionsAtOnce: UIEventSource - public readonly showTags: UIEventSource<"no" | undefined | "always" | "yes">; + public static readonly SHOW_TAGS_VALUES = ["always","yes","full"] as const + public readonly showTags: UIEventSource<"no" | undefined | "always" | "yes" | "full">; public readonly homeLocation: FeatureSource public readonly language: UIEventSource /** diff --git a/UI/Popup/TagRendering/TagRenderingQuestion.svelte b/UI/Popup/TagRendering/TagRenderingQuestion.svelte index daadbb50f..fd5d44a11 100644 --- a/UI/Popup/TagRendering/TagRenderingQuestion.svelte +++ b/UI/Popup/TagRendering/TagRenderingQuestion.svelte @@ -20,6 +20,7 @@ import {Translation} from "../../i18n/Translation"; import Constants from "../../../Models/Constants"; import {Unit} from "../../../Models/Unit"; + import UserRelatedState from "../../../Logic/State/UserRelatedState"; export let config: TagRenderingConfig; export let tags: UIEventSource>; @@ -220,7 +221,7 @@ - {#if $showTags === "yes" || $showTags === "always" || ($showTags === "" && numberOfCs >= Constants.userJourney.tagsVisibleAt) || $featureSwitchIsTesting || $featureSwitchIsDebugging} + {#if UserRelatedState.SHOW_TAGS_VALUES.indexOf($showTags) >= 0 || ($showTags === "" && numberOfCs >= Constants.userJourney.tagsVisibleAt) || $featureSwitchIsTesting || $featureSwitchIsDebugging}