Minor cleanup

This commit is contained in:
arkon
2021-09-18 16:13:14 -04:00
parent 45fad147bf
commit d7d46f4447
2 changed files with 9 additions and 13 deletions

View File

@@ -368,7 +368,8 @@ class MangaInfoHeaderAdapter(
private fun updateDescription(description: String?, isCurrentlyExpanded: Boolean): CharSequence {
return when {
description.isNullOrBlank() -> view.context.getString(R.string.unknown)
isCurrentlyExpanded -> description
isCurrentlyExpanded ->
description
.replace(Regex(" +\$", setOf(RegexOption.MULTILINE)), "")
.replace(Regex("[\\r\\n]{2,}", setOf(RegexOption.MULTILINE)), "\n")
else -> description