From 11598362b8bb8417a1d32bb8effdff381b1e32ca Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 25 May 2020 14:20:36 -0400 Subject: [PATCH] Using chapter number instead of chapter title for sharing pages --- .../eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 51def2744d..032a35735d 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -83,6 +83,8 @@ import nucleus.factory.RequiresPresenter import timber.log.Timber import uy.kohesive.injekt.injectLazy import java.io.File +import java.text.DecimalFormat +import java.text.DecimalFormatSymbols import java.util.Locale import kotlin.math.abs @@ -649,7 +651,13 @@ class ReaderActivity : BaseRxActivity(), val manga = presenter.manga ?: return val chapter = page.chapter.chapter - val text = "${manga.title}: ${chapter.name}, ${getString(R.string.page_, page.number)}" + val decimalFormat = + DecimalFormat("#.###", DecimalFormatSymbols().apply { decimalSeparator = '.' }) + + val text = "${manga.title}: ${getString( + R.string.chapter_, + decimalFormat.format(chapter.chapter_number) + )}, ${getString(R.string.page_, page.number)}" val stream = file.getUriCompat(this) val intent = Intent(Intent.ACTION_SEND).apply {