Skip to content

Commit 0bad025

Browse files
authored
Convert NeonIndication to data class. (#193)
1 parent d71778c commit 0bad025

File tree

1 file changed

+1
-19
lines changed
  • compose/snippets/src/main/java/com/example/compose/snippets/touchinput

1 file changed

+1
-19
lines changed

compose/snippets/src/main/java/com/example/compose/snippets/touchinput/Interactions.kt

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ private class NeonNode(
629629
// [END android_compose_interactions_neon_node]
630630

631631
// [START android_compose_interactions_neon_indication]
632-
class NeonIndication(private val shape: Shape, private val borderWidth: Dp) : IndicationNodeFactory {
632+
data class NeonIndication(private val shape: Shape, private val borderWidth: Dp) : IndicationNodeFactory {
633633

634634
override fun create(interactionSource: InteractionSource): DelegatableNode {
635635
return NeonNode(
@@ -639,23 +639,5 @@ class NeonIndication(private val shape: Shape, private val borderWidth: Dp) : In
639639
interactionSource
640640
)
641641
}
642-
643-
override fun equals(other: Any?): Boolean {
644-
if (this === other) return true
645-
if (javaClass != other?.javaClass) return false
646-
647-
other as NeonIndication
648-
649-
if (shape != other.shape) return false
650-
if (borderWidth != other.borderWidth) return false
651-
652-
return true
653-
}
654-
655-
override fun hashCode(): Int {
656-
var result = shape.hashCode()
657-
result = 31 * result + borderWidth.hashCode()
658-
return result
659-
}
660642
}
661643
// [END android_compose_interactions_neon_indication]

0 commit comments

Comments
 (0)