From 622df2df19ce4fa7049447995194d0f28b91d59f Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 9 Jun 2023 18:07:43 +0200 Subject: [PATCH] Fix: hide tag_apply_button when applied --- UI/Popup/TagApplyButton.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UI/Popup/TagApplyButton.ts b/UI/Popup/TagApplyButton.ts index be0d4566b..c368ee467 100644 --- a/UI/Popup/TagApplyButton.ts +++ b/UI/Popup/TagApplyButton.ts @@ -162,6 +162,8 @@ export default class TagApplyButton implements AutoAction, SpecialVisualization await Maproulette.singleton.closeTask(maproulette_id, Maproulette.STATUS_FIXED, { comment: "Tags are copied onto "+targetId+" with MapComplete" }) + tags.data["mr_taskStatus"] = "Fixed" + tags.ping() } } @@ -193,7 +195,7 @@ export default class TagApplyButton implements AutoAction, SpecialVisualization }) ).SetClass("subtle") const self = this - const applied = new UIEventSource(false) + const applied = new UIEventSource(tags?.data?.["mr_taskStatus"] !== "Created") // This will default to 'false' for non-maproulette challenges const applyButton = new SubtleButton( image, new Combine([msg, tagsExplanation]).SetClass("flex flex-col")