From 238a5db54d0150dd4496b795ee7836f0acf0a752 Mon Sep 17 00:00:00 2001 From: Jonatan Rhodin Date: Thu, 20 Jun 2024 09:38:28 +0200 Subject: [PATCH] Renamed function --- .../net/mullvad/mullvadvpn/repository/ChangelogRepository.kt | 4 ++-- .../kotlin/net/mullvad/mullvadvpn/util/StringExtensions.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/ChangelogRepository.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/ChangelogRepository.kt index 12ef286de27d..24545d3d97be 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/ChangelogRepository.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/repository/ChangelogRepository.kt @@ -3,7 +3,7 @@ package net.mullvad.mullvadvpn.repository import android.content.SharedPreferences import androidx.compose.ui.util.fastJoinToString import net.mullvad.mullvadvpn.util.IChangelogDataProvider -import net.mullvad.mullvadvpn.util.trim +import net.mullvad.mullvadvpn.util.trimAll private const val MISSING_VERSION_CODE = -1 private const val NEWLINE_CHAR = '\n' @@ -26,6 +26,6 @@ class ChangelogRepository( dataProvider .getChangelog() .split(BULLET_POINT_CHAR) - .map { it.split(NEWLINE_CHAR).trim().fastJoinToString(SPACE_STRING).trim() } + .map { it.split(NEWLINE_CHAR).trimAll().fastJoinToString(SPACE_STRING).trim() } .filter { it.isNotEmpty() } } diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/StringExtensions.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/StringExtensions.kt index f85350bcf4f0..adc64ec41e31 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/StringExtensions.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/StringExtensions.kt @@ -13,4 +13,4 @@ fun String.appendHideNavOnPlayBuild(isPlayBuild: Boolean): String = fun String.removeHtmlTags(): String = Html.fromHtml(this, HtmlCompat.FROM_HTML_MODE_LEGACY).toString() -fun List.trim() = map { it.trim() } +fun List.trimAll() = map { it.trim() }