Skip to content

Commit

Permalink
Merge pull request #467 from skydoves/palette/localinspect
Browse files Browse the repository at this point in the history
Return apply if the local inspection mode is true on the palette plugin
  • Loading branch information
skydoves authored Apr 13, 2024
2 parents 9ee51c5 + 6545764 commit d61349c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.platform.LocalInspectionMode
import com.skydoves.landscapist.ImageOptions
import com.skydoves.landscapist.plugins.ImagePlugin

Expand Down Expand Up @@ -53,6 +54,8 @@ public data class PalettePlugin(
imageBitmap: ImageBitmap?,
): ImagePlugin =
apply {
if (LocalInspectionMode.current) return@apply

imageBitmap?.let {
bitmapPalette.applyImageModel(this.imageModel ?: imageModel)
bitmapPalette.generate(it)
Expand Down

0 comments on commit d61349c

Please sign in to comment.