Remove useless code
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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) }
|
||||||
|
|||||||
Reference in New Issue
Block a user