Skip to content

Commit

Permalink
Fix EditPlaylist image picker launcher when there is no photo
Browse files Browse the repository at this point in the history
  • Loading branch information
alashow committed Dec 18, 2021
1 parent 876ad6d commit 2be50ae
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ import tm.alashow.ui.components.DraggableItemSurface
import tm.alashow.ui.components.IconButton
import tm.alashow.ui.components.TextRoundedButton
import tm.alashow.ui.components.textIconModifier
import tm.alashow.ui.simpleClickable
import tm.alashow.ui.theme.AppTheme
import tm.alashow.ui.theme.Orange

Expand Down Expand Up @@ -244,7 +245,12 @@ private fun EditablePlaylistArtwork(
CoverImage(
data = image,
size = 180.dp,
modifier = Modifier.padding(AppTheme.specs.padding),
modifier = Modifier
.padding(AppTheme.specs.padding)
.simpleClickable {
if (image == null)
imagePickerLauncher.launch("image/*")
},
imageModifier = Modifier.coloredRippleClickable(
color = adaptiveColor.color,
rippleRadius = Dp.Unspecified,
Expand Down

0 comments on commit 2be50ae

Please sign in to comment.