Content-Length: 227262 | pFad | http://github.com/toastkidjp/Yobidashi_kt/commit/d79f55bcbe9dd94b45e7812e8860fd327834cf03

41 refactor #506 Use wrapper. · toastkidjp/Yobidashi_kt@d79f55b · GitHub
Skip to content

Commit

Permalink
refactor #506 Use wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
toastkidjp committed Dec 19, 2024
1 parent efe8a94 commit d79f55b
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions image/src/main/java/jp/toastkid/image/preview/ImagePreviewUi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ import androidx.core.net.toUri
import androidx.exifinterface.media.ExifInterface
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.ViewModelStoreOwner
import coil3.compose.AsyncImage
import coil3.request.ImageRequest
import coil3.request.crossfade
import jp.toastkid.image.Image
import jp.toastkid.image.R
import jp.toastkid.image.preview.attach.AttachToAnyAppUseCase
Expand All @@ -64,6 +61,7 @@ import jp.toastkid.image.preview.detail.ExifInformationExtractorUseCase
import jp.toastkid.image.preview.viewmodel.ImagePreviewViewModel
import jp.toastkid.lib.ContentViewModel
import jp.toastkid.ui.dialog.ConfirmDialog
import jp.toastkid.ui.image.EfficientImage
import kotlinx.coroutines.launch
import java.io.BufferedInputStream
import java.io.File
Expand Down Expand Up @@ -101,12 +99,8 @@ internal fun ImagePreviewUi(
state = pagerState
) {
with(sharedTransitionScope) {
AsyncImage(
model = ImageRequest.Builder(LocalContext.current)
.data(viewModel.getCurrentImage(pagerState.currentPage).path)
.memoryCacheKey(viewModel.getCurrentImage(pagerState.currentPage).path)
.crossfade(true)
.build(),
EfficientImage(
model = viewModel.getCurrentImage(pagerState.currentPage).path,
contentDescription = viewModel.getCurrentImage(pagerState.currentPage).name,
colorFilter = viewModel.colorFilterState.value,
modifier = Modifier
Expand Down

0 comments on commit d79f55b

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/toastkidjp/Yobidashi_kt/commit/d79f55bcbe9dd94b45e7812e8860fd327834cf03

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy