Skip to content

Commit

Permalink
fix separator for realz
Browse files Browse the repository at this point in the history
  • Loading branch information
nonproto committed Feb 6, 2024
1 parent 35ecee2 commit 4107d3d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import eu.kanade.tachiyomi.ui.manga.MangaDetailsAdapter
import eu.kanade.tachiyomi.util.chapter.ChapterUtil
import eu.kanade.tachiyomi.util.system.dpToPx
import org.nekomanga.R
import org.nekomanga.constants.Constants
import org.nekomanga.databinding.ChaptersItemBinding

class ChapterHolder(
Expand Down Expand Up @@ -99,7 +100,7 @@ class ChapterHolder(
showBookmark = false,
hideStatus = isLocked,
)
binding.chapterScanlator.text = statuses.joinToString(" ? ")
binding.chapterScanlator.text = statuses.joinToString(Constants.SEPARATOR)

val status =
when {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import eu.kanade.tachiyomi.util.chapter.ChapterUtil
import java.text.DecimalFormat
import java.text.DecimalFormatSymbols
import org.nekomanga.R
import org.nekomanga.constants.Constants
import org.nekomanga.databinding.ReaderChapterItemBinding
import org.nekomanga.domain.details.MangaDetailsPreferences
import uy.kohesive.injekt.injectLazy
Expand Down Expand Up @@ -109,7 +110,7 @@ class ReaderChapterItem(val chapter: Chapter, val manga: Manga, val isCurrent: B
binding.chapterTitle.typeface = typeface
binding.chapterSubtitle.typeface = typeface
binding.chapterLanguage.typeface = typeface
binding.chapterSubtitle.text = statuses.joinToString(" ? ")
binding.chapterSubtitle.text = statuses.joinToString(Constants.SEPARATOR)
}

override fun unbindView(item: ReaderChapterItem) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import kotlinx.collections.immutable.toImmutableList
import kotlinx.collections.immutable.toPersistentList
import kotlinx.coroutines.launch
import org.nekomanga.R
import org.nekomanga.constants.Constants
import org.nekomanga.core.util.launchDelayed
import org.nekomanga.logging.TimberKt
import org.nekomanga.presentation.components.dropdown.SimpleDropDownItem
Expand Down Expand Up @@ -402,7 +403,7 @@ private fun ChapterInfo(
}
}
Text(
text = statuses.joinToString(" ? "),
text = statuses.joinToString(Constants.SEPARATOR),
style =
MaterialTheme.typography.bodyMedium.copy(
color = secondaryTextColor,
Expand All @@ -413,7 +414,7 @@ private fun ChapterInfo(
overflow = TextOverflow.Ellipsis,
)

statuses.joinToString(" ? ")
statuses.joinToString(Constants.SEPARATOR)
}
}
Box(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import jp.wasabeef.gap.Gap
import kotlin.math.roundToInt
import kotlinx.collections.immutable.toPersistentList
import org.nekomanga.R
import org.nekomanga.constants.Constants
import org.nekomanga.domain.manga.Stats
import org.nekomanga.presentation.components.NekoColors
import org.nekomanga.presentation.components.NoRippleText
Expand Down Expand Up @@ -96,7 +97,7 @@ fun InformationBlock(
true -> authorProvider().trim()
false -> {
listOfNotNull(authorProvider().trim(), artistProvider().trim())
.joinToString(" ? ")
.joinToString(Constants.SEPARATOR)
}
}

Expand All @@ -110,7 +111,7 @@ fun InformationBlock(
style = MaterialTheme.typography.bodyLarge,
color = mediumAlpha,
)
val creators = creator.split(" ? ").map { it.trim() }
val creators = creator.split(Constants.SEPARATOR).map { it.trim() }
SimpleDropdownMenu(
expanded = creatorExpanded,
onDismiss = { creatorExpanded = false },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ package org.nekomanga.constants

object Constants {
const val USER_AGENT = "Mozilla/5.0 (Windows NT 6.3; WOW64)"

const val SEPARATOR = " · "
}

0 comments on commit 4107d3d

Please sign in to comment.