Show chapter scanlator on reader transition (#8910)
Closes #7131 (cherry picked from commit 287489d7d07881cdfcb0494c4c9d6163d63d2fce)
This commit is contained in:
parent
8fcfef87af
commit
a7fefb4c9c
@ -63,11 +63,19 @@ class ReaderTransitionView @JvmOverloads constructor(context: Context, attrs: At
|
|||||||
binding.upperText.text = buildSpannedString {
|
binding.upperText.text = buildSpannedString {
|
||||||
bold { append(context.getString(R.string.transition_previous)) }
|
bold { append(context.getString(R.string.transition_previous)) }
|
||||||
append("\n${prevChapter.name}")
|
append("\n${prevChapter.name}")
|
||||||
|
if (!prevChapter.scanlator.isNullOrBlank()) {
|
||||||
|
append(DOT_SEPERATOR)
|
||||||
|
append("${prevChapter.scanlator}")
|
||||||
|
}
|
||||||
if (isPrevDownloaded) addDLImageSpan()
|
if (isPrevDownloaded) addDLImageSpan()
|
||||||
}
|
}
|
||||||
binding.lowerText.text = buildSpannedString {
|
binding.lowerText.text = buildSpannedString {
|
||||||
bold { append(context.getString(R.string.transition_current)) }
|
bold { append(context.getString(R.string.transition_current)) }
|
||||||
append("\n${transition.from.chapter.name}")
|
append("\n${transition.from.chapter.name}")
|
||||||
|
if (!transition.from.chapter.scanlator.isNullOrBlank()) {
|
||||||
|
append(DOT_SEPERATOR)
|
||||||
|
append("${transition.from.chapter.scanlator}")
|
||||||
|
}
|
||||||
if (isCurrentDownloaded) addDLImageSpan()
|
if (isCurrentDownloaded) addDLImageSpan()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -100,11 +108,19 @@ class ReaderTransitionView @JvmOverloads constructor(context: Context, attrs: At
|
|||||||
binding.upperText.text = buildSpannedString {
|
binding.upperText.text = buildSpannedString {
|
||||||
bold { append(context.getString(R.string.transition_finished)) }
|
bold { append(context.getString(R.string.transition_finished)) }
|
||||||
append("\n${transition.from.chapter.name}")
|
append("\n${transition.from.chapter.name}")
|
||||||
|
if (!transition.from.chapter.scanlator.isNullOrBlank()) {
|
||||||
|
append(DOT_SEPERATOR)
|
||||||
|
append("${transition.from.chapter.scanlator}")
|
||||||
|
}
|
||||||
if (isCurrentDownloaded) addDLImageSpan()
|
if (isCurrentDownloaded) addDLImageSpan()
|
||||||
}
|
}
|
||||||
binding.lowerText.text = buildSpannedString {
|
binding.lowerText.text = buildSpannedString {
|
||||||
bold { append(context.getString(R.string.transition_next)) }
|
bold { append(context.getString(R.string.transition_next)) }
|
||||||
append("\n${nextChapter.name}")
|
append("\n${nextChapter.name}")
|
||||||
|
if (!nextChapter.scanlator.isNullOrBlank()) {
|
||||||
|
append(DOT_SEPERATOR)
|
||||||
|
append("${nextChapter.scanlator}")
|
||||||
|
}
|
||||||
if (isNextDownloaded) addDLImageSpan()
|
if (isNextDownloaded) addDLImageSpan()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -149,3 +165,5 @@ class ReaderTransitionView @JvmOverloads constructor(context: Context, attrs: At
|
|||||||
binding.warning.isVisible = true
|
binding.warning.isVisible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private const val DOT_SEPERATOR = " • "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user