mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 13:39:18 +01:00
Don't show last chapter number when there are 0 chapters or chapters with no numbers.
This prevents one shots from showing with -1 as last chapter and instead just leaves it blank
This commit is contained in:
parent
b7903023b6
commit
431676acd1
@ -7,7 +7,6 @@ import android.content.ClipboardManager
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.Color
|
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
@ -249,8 +248,10 @@ class MangaInfoController : NucleusController<MangaInfoPresenter>(),
|
|||||||
* @param count number of chapters.
|
* @param count number of chapters.
|
||||||
*/
|
*/
|
||||||
fun setChapterCount(count: Float) {
|
fun setChapterCount(count: Float) {
|
||||||
|
if (count > 0f) {
|
||||||
manga_chapters?.text = DecimalFormat("#.#").format(count)
|
manga_chapters?.text = DecimalFormat("#.#").format(count)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun setLastUpdateDate(date: Date) {
|
fun setLastUpdateDate(date: Date) {
|
||||||
manga_last_update?.text = DateFormat.getDateInstance(DateFormat.SHORT).format(date)
|
manga_last_update?.text = DateFormat.getDateInstance(DateFormat.SHORT).format(date)
|
||||||
|
Loading…
Reference in New Issue
Block a user