処理の順番を改善

This commit is contained in:
r-ca 2024-01-24 18:29:19 +09:00
parent da5b134a2b
commit 749cad231c
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -74,13 +74,13 @@ public class DocumentProcessorImpl implements DocumentProcessor{
logger.debug("addNewPageToLast", "called");
String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする
lacertaVcs.insertPage(this.documentDetail.getPages().size(), filename);
Page page = new Page();
page.setFileName(filename);
page.setBitmap(bitmap);
this.documentDetail.getPages().add(page);
lacertaVcs.insertPage(documentDetail.getPages().size(), filename);
this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename);
logger.info("addNewPageToLast", "finished");