mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
XmlMetaを正常に更新できるようにした
This commit is contained in:
parent
df14850df1
commit
673918771c
|
@ -164,10 +164,10 @@ public class ScannerManagerActivity extends AppCompatActivity {
|
|||
document.createDocument(documentMeta).thenAccept((documentDetail1) -> {
|
||||
Bitmap[] bitmaps = new Bitmap[this.croppedImages.size()];
|
||||
this.croppedImages.toArray(bitmaps);
|
||||
addPagesToDocumentDetail(documentDetail1, bitmaps).thenRun(() -> {
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
});
|
||||
addPagesToDocumentDetail(documentDetail1, bitmaps).join();
|
||||
document.updateDocument(documentDetail1).join();
|
||||
dialog.dismiss();
|
||||
finish();
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public class ScannerManagerActivity extends AppCompatActivity {
|
|||
private CompletableFuture<Void> addPagesToDocumentDetail(DocumentDetail documentDetail, Bitmap[] bitmaps) {
|
||||
return CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
documentProcessorFactory.create(documentDetail).addNewPagesToLast(bitmaps);
|
||||
document.updateDocument(documentProcessorFactory.create(documentDetail).addNewPagesToLast(bitmaps).getDocumentDetail()).join();
|
||||
lacertaVcsFactory.create(documentDetail.getMeta().getId()).generateRevisionAtCurrent("Initial commit");
|
||||
} catch (Exception e) {
|
||||
logger.error(TAG, "Error: " + e.getMessage());
|
||||
|
|
|
@ -119,6 +119,7 @@ public class DocumentImpl implements Document {
|
|||
@Override
|
||||
public CompletableFuture<Void> updateDocument(DocumentDetail detail) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
updateXmlMeta(detail).join();
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user