From 36ae3883323d2a141a562cf401da3475f5c7e222 Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Fri, 24 Feb 2023 10:29:38 +0700 Subject: [PATCH] Bump compose-bom version 2023.02.00-beta02 (#9137) --- .../library/components/CommonMangaItem.kt | 27 ++----------------- gradle/compose.versions.toml | 2 +- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/library/components/CommonMangaItem.kt b/app/src/main/java/eu/kanade/presentation/library/components/CommonMangaItem.kt index 975d5e1b24..e59ef41903 100644 --- a/app/src/main/java/eu/kanade/presentation/library/components/CommonMangaItem.kt +++ b/app/src/main/java/eu/kanade/presentation/library/components/CommonMangaItem.kt @@ -29,12 +29,10 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha import androidx.compose.ui.draw.clip +import androidx.compose.ui.draw.drawBehind import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Shadow -import androidx.compose.ui.graphics.drawscope.ContentDrawScope -import androidx.compose.ui.node.DrawModifierNode -import androidx.compose.ui.node.modifierElementOf import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp @@ -306,28 +304,7 @@ private fun GridItemSelectable( private fun Modifier.selectedOutline( isSelected: Boolean, color: Color, -): Modifier { - class SelectedOutlineNode(var selected: Boolean, var color: Color) : DrawModifierNode, Modifier.Node() { - override fun ContentDrawScope.draw() { - if (selected) drawRect(color) - drawContent() - } - } - - return this then modifierElementOf( - key = isSelected.hashCode() + color.hashCode(), - create = { SelectedOutlineNode(isSelected, color) }, - update = { - it.selected = isSelected - it.color = color - }, - definitions = { - name = "selectionOutline" - properties["isSelected"] = isSelected - properties["color"] = color - }, - ) -} +) = this then drawBehind { if (isSelected) drawRect(color = color) } /** * Layout of list item. diff --git a/gradle/compose.versions.toml b/gradle/compose.versions.toml index 68c020cef0..bf25263d35 100644 --- a/gradle/compose.versions.toml +++ b/gradle/compose.versions.toml @@ -1,6 +1,6 @@ [versions] compiler = "1.4.3" -compose-bom = "2023.02.00-beta01" +compose-bom = "2023.02.00-beta02" accompanist = "0.29.1-alpha" [libraries]