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