From 331a520be00e3e025c7cc5a1abc470dd996957aa Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 29 Jan 2024 01:38:52 +0900 Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E3=81=AB=E5=88=87=E3=82=8A?= =?UTF-8?q?=E6=9B=BF=E3=81=88=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/component/common/LacertaApplyTagDialog.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/component/common/src/main/java/one/nem/lacerta/component/common/LacertaApplyTagDialog.java b/component/common/src/main/java/one/nem/lacerta/component/common/LacertaApplyTagDialog.java index 3a76ebf5..c5acb14b 100644 --- a/component/common/src/main/java/one/nem/lacerta/component/common/LacertaApplyTagDialog.java +++ b/component/common/src/main/java/one/nem/lacerta/component/common/LacertaApplyTagDialog.java @@ -133,10 +133,14 @@ public class LacertaApplyTagDialog extends DialogFragment { } private void applyChangeToVariable(boolean isChecked, String tagId) { + logger.debug("applyChangeToVariable", "isChecked: " + isChecked); + logger.debug("applyChangeToVariable", "tagId: " + tagId); + logger.debug("applyChangeToVariable", "this.registeredTags.size(): " + this.registeredTags.size()); + logger.debug("applyChangeToVariable", "this.appliedTags.size(): " + this.appliedTags.size()); if (isChecked) { - this.registeredTags.stream().findAny().filter(tag -> tag.getId().equals(tagId)).ifPresent(tag -> this.appliedTags.add(tag)); + this.registeredTags.stream().filter(tag -> tag.getId().equals(tagId)).findFirst().ifPresent(tag -> this.appliedTags.add(tag)); } else { - this.appliedTags.stream().findAny().filter(tag -> tag.getId().equals(tagId)).ifPresent(tag -> this.appliedTags.remove(tag)); + this.appliedTags.stream().filter(tag -> tag.getId().equals(tagId)).findFirst().ifPresent(tag -> this.appliedTags.remove(tag)); } }