-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
REFACTOR🧽기능 동작은 유지하되, 앱 로직(프로덕션 코드)의 구조와 품질을 개선기능 동작은 유지하되, 앱 로직(프로덕션 코드)의 구조와 품질을 개선🍀큰나현큰나현 담당큰나현 담당
Description
What is this issue? 🛠
DiaryWriteViewModel이 ML Kit 텍스트 인식 로직을 직접 구현하고 있습니다.
fun extractTextFromImage(uri: Uri, tempFileToDelete: File? = null) {
// ...
val image = InputImage.fromFilePath(context, uri)
val recognizer = TextRecognition.getClient(TextRecognizerOptions.DEFAULT_OPTIONS)
recognizer.process(image).await().text
// ...
}ViewModel은 InputImage나 TextRecognizer에 대해 알지 못해야 합니다. 또한 ViewModel을 Context와 결합시키고 있습니다.
TextRecognitionRepository나 별도의 헬퍼 클래스로 분리해 개선합니다.
Progress 🏃♀️
- [ ]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
REFACTOR🧽기능 동작은 유지하되, 앱 로직(프로덕션 코드)의 구조와 품질을 개선기능 동작은 유지하되, 앱 로직(프로덕션 코드)의 구조와 품질을 개선🍀큰나현큰나현 담당큰나현 담당