From b757765383feee1eb6d689a8bee2cb401732ba4f Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Mon, 15 Jul 2024 00:00:36 +0200 Subject: [PATCH] change: Remove copyWithCollapsed helper (#823) Holdover from when Java interoperability was required. --- .../main/java/app/pachli/adapter/StatusDetailedViewHolder.kt | 2 +- app/src/main/java/app/pachli/viewdata/StatusViewData.kt | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/app/pachli/adapter/StatusDetailedViewHolder.kt b/app/src/main/java/app/pachli/adapter/StatusDetailedViewHolder.kt index b1e6cf7ad..f2131c6cf 100644 --- a/app/src/main/java/app/pachli/adapter/StatusDetailedViewHolder.kt +++ b/app/src/main/java/app/pachli/adapter/StatusDetailedViewHolder.kt @@ -114,7 +114,7 @@ class StatusDetailedViewHolder( ) { // We never collapse statuses in the detail view val uncollapsedStatus = - if (viewData.isCollapsible && viewData.isCollapsed) viewData.copyWithCollapsed(false) else viewData + if (viewData.isCollapsible && viewData.isCollapsed) viewData.copy(isCollapsed = false) else viewData super.setupWithStatus(uncollapsedStatus, listener, statusDisplayOptions, payloads) setupCard( uncollapsedStatus, diff --git a/app/src/main/java/app/pachli/viewdata/StatusViewData.kt b/app/src/main/java/app/pachli/viewdata/StatusViewData.kt index 06318a8bd..0a8fced8b 100644 --- a/app/src/main/java/app/pachli/viewdata/StatusViewData.kt +++ b/app/src/main/java/app/pachli/viewdata/StatusViewData.kt @@ -195,9 +195,6 @@ data class StatusViewData( this.isCollapsible = shouldTrimStatus(this.content) } - /** Helper for Java */ - fun copyWithCollapsed(isCollapsed: Boolean) = copy(isCollapsed = isCollapsed) - companion object { fun from( status: Status,