From a6cfea3f050f6d5c9442d0c3459feeea1978e198 Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Tue, 8 Jul 2025 18:26:18 +0200 Subject: [PATCH] Make `ContentAvoidingLayoutData` an immutable data class (#4999) --- .../timeline/components/layout/ContentAvoidingLayout.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/layout/ContentAvoidingLayout.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/layout/ContentAvoidingLayout.kt index d50c6d72ce..36f3204f89 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/layout/ContentAvoidingLayout.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/layout/ContentAvoidingLayout.kt @@ -112,12 +112,11 @@ fun ContentAvoidingLayout( * @param nonOverlappingContentWidth The width of the part of the content that can't overlap with the timestamp. * @param nonOverlappingContentHeight The height of the part of the content that can't overlap with the timestamp. */ -@Suppress("DataClassShouldBeImmutable") data class ContentAvoidingLayoutData( - var contentWidth: Int = 0, - var contentHeight: Int = 0, - var nonOverlappingContentWidth: Int = contentWidth, - var nonOverlappingContentHeight: Int = contentHeight, + val contentWidth: Int = 0, + val contentHeight: Int = 0, + val nonOverlappingContentWidth: Int = contentWidth, + val nonOverlappingContentHeight: Int = contentHeight, ) /**