mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +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) -> {
|
document.createDocument(documentMeta).thenAccept((documentDetail1) -> {
|
||||||
Bitmap[] bitmaps = new Bitmap[this.croppedImages.size()];
|
Bitmap[] bitmaps = new Bitmap[this.croppedImages.size()];
|
||||||
this.croppedImages.toArray(bitmaps);
|
this.croppedImages.toArray(bitmaps);
|
||||||
addPagesToDocumentDetail(documentDetail1, bitmaps).thenRun(() -> {
|
addPagesToDocumentDetail(documentDetail1, bitmaps).join();
|
||||||
dialog.dismiss();
|
document.updateDocument(documentDetail1).join();
|
||||||
finish();
|
dialog.dismiss();
|
||||||
});
|
finish();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ public class ScannerManagerActivity extends AppCompatActivity {
|
||||||
private CompletableFuture<Void> addPagesToDocumentDetail(DocumentDetail documentDetail, Bitmap[] bitmaps) {
|
private CompletableFuture<Void> addPagesToDocumentDetail(DocumentDetail documentDetail, Bitmap[] bitmaps) {
|
||||||
return CompletableFuture.runAsync(() -> {
|
return CompletableFuture.runAsync(() -> {
|
||||||
try {
|
try {
|
||||||
documentProcessorFactory.create(documentDetail).addNewPagesToLast(bitmaps);
|
document.updateDocument(documentProcessorFactory.create(documentDetail).addNewPagesToLast(bitmaps).getDocumentDetail()).join();
|
||||||
lacertaVcsFactory.create(documentDetail.getMeta().getId()).generateRevisionAtCurrent("Initial commit");
|
lacertaVcsFactory.create(documentDetail.getMeta().getId()).generateRevisionAtCurrent("Initial commit");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error(TAG, "Error: " + e.getMessage());
|
logger.error(TAG, "Error: " + e.getMessage());
|
||||||
|
|
|
@ -119,6 +119,7 @@ public class DocumentImpl implements Document {
|
||||||
@Override
|
@Override
|
||||||
public CompletableFuture<Void> updateDocument(DocumentDetail detail) {
|
public CompletableFuture<Void> updateDocument(DocumentDetail detail) {
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
|
updateXmlMeta(detail).join();
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user