mirror of https://github.com/readrops/Readrops.git
Fix item read time calculation
This commit is contained in:
parent
6893e9a199
commit
a3ffde0d73
|
@ -9,7 +9,7 @@ object Utils {
|
|||
private const val AVERAGE_WORDS_PER_MINUTE = 250
|
||||
|
||||
fun readTimeFromString(value: String): Double {
|
||||
val nbWords = value.split("\\s+").size
|
||||
val nbWords = value.split(Regex("\\s+")).size
|
||||
return nbWords.toDouble() / AVERAGE_WORDS_PER_MINUTE
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue