mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-13 20:48:56 +01:00
Refactor duplicate chapter number formatters
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package eu.kanade.presentation.util
|
||||
|
||||
import java.text.DecimalFormat
|
||||
import java.text.DecimalFormatSymbols
|
||||
|
||||
private val formatter = DecimalFormat(
|
||||
"#.###",
|
||||
DecimalFormatSymbols().apply { decimalSeparator = '.' },
|
||||
)
|
||||
|
||||
fun formatChapterNumber(chapterNumber: Float): String {
|
||||
return formatter.format(chapterNumber)
|
||||
}
|
||||
Reference in New Issue
Block a user