From 9a4d3a1310448639acb6f864df82189c9e2ee116 Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 29 Jan 2024 00:38:03 +0900 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E5=90=8C=E6=9C=9F=E5=AE=9F=E8=A1=8C?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/common/LacertaApplyTagDialog.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 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 14508239..596a2d01 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 @@ -18,6 +18,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; import javax.inject.Inject; @@ -49,6 +50,7 @@ public class LacertaApplyTagDialog extends DialogFragment { private String negativeButtonText; private String documentId; private LacertaApplyTagDialogListener listener; + private ArrayList registeredTags; private ArrayList appliedTags; // Setter @@ -152,9 +154,17 @@ public class LacertaApplyTagDialog extends DialogFragment { }); } - private void setAppliedTagList(String documentId) { - lacertaLibrary.getAppliedTagList(documentId).thenAccept(documentTags -> { - this.appliedTags = documentTags; + private CompletableFuture setAppliedTagList(String documentId) { + return CompletableFuture.runAsync(() -> { + lacertaLibrary.getAppliedTagList(documentId).thenAccept(documentTags -> { + this.appliedTags = documentTags; + }); + }); + } + + private void setRegisteredTagList() { + lacertaLibrary.getTagList().thenAccept(documentTags -> { + this.registeredTags = documentTags; }); }