Skip to content

Commit

Permalink
Renamed function
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Jun 20, 2024
1 parent 745e53b commit 238a5db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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() }
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>.trim() = map { it.trim() }
fun List<String>.trimAll() = map { it.trim() }

0 comments on commit 238a5db

Please sign in to comment.