mirror of
				https://github.com/lacerta-doc/Lacerta.git
				synced 2025-11-04 00:40:49 +00:00 
			
		
		
		
	WIP
This commit is contained in:
		
							parent
							
								
									efdf9c1fea
								
							
						
					
					
						commit
						68dddbabee
					
				@ -142,9 +142,7 @@ public class LacertaApplyTagDialog extends DialogFragment {
 | 
				
			|||||||
        return CompletableFuture.supplyAsync(() -> {
 | 
					        return CompletableFuture.supplyAsync(() -> {
 | 
				
			||||||
            ArrayList<DocumentTagApplyTagDialogExtendedModel> documentTagArrayList = new ArrayList<>();
 | 
					            ArrayList<DocumentTagApplyTagDialogExtendedModel> documentTagArrayList = new ArrayList<>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            setRegisteredTagList().join();
 | 
					            setRegisteredTagList().thenRun(() -> setAppliedTagList(documentId)).thenAccept(Void -> {
 | 
				
			||||||
            setAppliedTagList(documentId).join();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                logger.debug("getDocumentTagArrayList", "this.registeredTags.size(): " + this.registeredTags.size());
 | 
					                logger.debug("getDocumentTagArrayList", "this.registeredTags.size(): " + this.registeredTags.size());
 | 
				
			||||||
                logger.debug("getDocumentTagArrayList", "this.appliedTags.size(): " + this.appliedTags.size());
 | 
					                logger.debug("getDocumentTagArrayList", "this.appliedTags.size(): " + this.appliedTags.size());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -159,7 +157,7 @@ public class LacertaApplyTagDialog extends DialogFragment {
 | 
				
			|||||||
                    documentTagArrayList.add(new DocumentTagApplyTagDialogExtendedModel(
 | 
					                    documentTagArrayList.add(new DocumentTagApplyTagDialogExtendedModel(
 | 
				
			||||||
                            new DocumentTag(this.registeredTags.get(i).getId(), this.registeredTags.get(i).getName(), this.registeredTags.get(i).getColor()), isChecked));
 | 
					                            new DocumentTag(this.registeredTags.get(i).getId(), this.registeredTags.get(i).getName(), this.registeredTags.get(i).getColor()), isChecked));
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					            }).join();
 | 
				
			||||||
            return documentTagArrayList;
 | 
					            return documentTagArrayList;
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -167,7 +165,11 @@ public class LacertaApplyTagDialog extends DialogFragment {
 | 
				
			|||||||
    private CompletableFuture<Void> setAppliedTagList(String documentId) {
 | 
					    private CompletableFuture<Void> setAppliedTagList(String documentId) {
 | 
				
			||||||
        return CompletableFuture.supplyAsync(() -> {
 | 
					        return CompletableFuture.supplyAsync(() -> {
 | 
				
			||||||
            lacertaLibrary.getAppliedTagList(documentId).thenAccept(documentTags -> {
 | 
					            lacertaLibrary.getAppliedTagList(documentId).thenAccept(documentTags -> {
 | 
				
			||||||
 | 
					                if (documentTags == null) {
 | 
				
			||||||
 | 
					                    this.appliedTags = new ArrayList<>();
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
                    this.appliedTags = documentTags;
 | 
					                    this.appliedTags = documentTags;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            return null;
 | 
					            return null;
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user