mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-25 09:13:16 +00:00
WIP
This commit is contained in:
parent
426a3534c8
commit
9042817d63
|
@ -116,7 +116,7 @@ public class ScannerManagerActivity extends AppCompatActivity {
|
|||
for (String result : croppedImageResults) {
|
||||
croppedImages.add(BitmapFactory.decodeFile(result));
|
||||
}
|
||||
processResult(croppedImages);
|
||||
updatePage();
|
||||
return null;
|
||||
},
|
||||
(errorMessage) -> {
|
||||
|
@ -267,6 +267,8 @@ public class ScannerManagerActivity extends AppCompatActivity {
|
|||
document.getDocument(documentId).thenAccept((documentDetail) -> {
|
||||
DocumentProcessor documentProcessor = documentProcessorFactory.create(documentDetail);
|
||||
documentProcessor.updatePageAtIndex(croppedImages.get(0), index);
|
||||
logger.debug(TAG, "documentProcessor.getPageCount(): " + documentProcessor.getPageCount()
|
||||
+ ", documentDetail.getPages().size(): " + documentDetail.getPages().size());
|
||||
document.updateDocument(documentProcessor.getDocumentDetail()).join();
|
||||
dialog.dismiss();
|
||||
});
|
||||
|
|
|
@ -133,6 +133,8 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
|||
logger.debug("updatePageAtIndex", "called");
|
||||
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
|
||||
|
||||
logger.debug("updatePageAtIndex", "filename1: " + filename);
|
||||
|
||||
try {
|
||||
this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename);
|
||||
} catch (Exception e) {
|
||||
|
@ -142,6 +144,8 @@ public class DocumentProcessorImpl implements DocumentProcessor{
|
|||
lacertaVcs.undo();
|
||||
}
|
||||
|
||||
logger.debug("updatePageAtIndex", "filename: " + filename);
|
||||
|
||||
Page page = new Page();
|
||||
page.setFileName(filename);
|
||||
page.setBitmap(bitmap);
|
||||
|
|
Loading…
Reference in New Issue
Block a user