Remove useless code

This commit is contained in:
Pierre-Yves Nicolas
2025-06-25 18:49:59 +02:00
parent 483165450b
commit d025384f39
2 changed files with 22 additions and 26 deletions

View File

@@ -51,7 +51,6 @@ class MainActivity : ComponentActivity() {
val pageIds by viewModel.pageIds.collectAsStateWithLifecycle() val pageIds by viewModel.pageIds.collectAsStateWithLifecycle()
val context = LocalContext.current val context = LocalContext.current
MyScanTheme { MyScanTheme {
Column {
when (val screen = currentScreen) { when (val screen = currentScreen) {
is Screen.Camera -> { is Screen.Camera -> {
CameraScreen( CameraScreen(
@@ -79,7 +78,6 @@ class MainActivity : ComponentActivity() {
} }
} }
} }
}
private fun sharePdf( private fun sharePdf(
viewModel: MainViewModel, viewModel: MainViewModel,

View File

@@ -170,8 +170,6 @@ class MainViewModel(
} }
} }
fun pageCount(): Int = pageIds.value.size
fun getBitmap(id: String): Bitmap? { fun getBitmap(id: String): Bitmap? {
val bytes = imageRepository.getContent(id) val bytes = imageRepository.getContent(id)
return bytes?.let { BitmapFactory.decodeByteArray(it, 0, it.size) } return bytes?.let { BitmapFactory.decodeByteArray(it, 0, it.size) }