mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
AppliedTagをクラス変数で持つように
This commit is contained in:
parent
04e0c9c05a
commit
bf58f25cd5
|
@ -49,6 +49,7 @@ public class LacertaApplyTagDialog extends DialogFragment {
|
|||
private String negativeButtonText;
|
||||
private String documentId;
|
||||
private LacertaApplyTagDialogListener listener;
|
||||
private ArrayList<DocumentTag> appliedTags;
|
||||
|
||||
// Setter
|
||||
|
||||
|
@ -133,11 +134,11 @@ public class LacertaApplyTagDialog extends DialogFragment {
|
|||
return CompletableFuture.supplyAsync(() -> {
|
||||
ArrayList<DocumentTagApplyTagDialogExtendedModel> documentTagArrayList = new ArrayList<>();
|
||||
lacertaLibrary.getTagList().thenAccept(documentTags -> {
|
||||
ArrayList<DocumentTag> appliedTags = lacertaLibrary.getAppliedTagList(documentId).join();
|
||||
setAppliedTagList(documentId);
|
||||
for (int i = 0; i < documentTags.size(); i++) {
|
||||
boolean isChecked = false;
|
||||
for (int j = 0; j < appliedTags.size(); j++) {
|
||||
if (documentTags.get(i).getId().equals(appliedTags.get(j).getId())) {
|
||||
for (int j = 0; j < this.appliedTags.size(); j++) {
|
||||
if (documentTags.get(i).getId().equals(this.appliedTags.get(j).getId())) {
|
||||
isChecked = true;
|
||||
break;
|
||||
}
|
||||
|
@ -151,4 +152,10 @@ public class LacertaApplyTagDialog extends DialogFragment {
|
|||
});
|
||||
}
|
||||
|
||||
private void setAppliedTagList(String documentId) {
|
||||
lacertaLibrary.getAppliedTagList(documentId).thenAccept(documentTags -> {
|
||||
this.appliedTags = documentTags;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user