fix: it was only an int for convenience (#330)
Probably would have saved a lot of elaborate attempts to fix the issue by simply going the other way.
This commit is contained in:
parent
771cdcc163
commit
9ace8e5235
3 changed files with 5 additions and 5 deletions
|
@ -993,7 +993,7 @@ fun countDown(media: Media, view: ViewGroup) {
|
|||
fun sinceWhen(media: Media, view: ViewGroup) {
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
MangaUpdates().search(media.name ?: media.nameRomaji, media.startDate)?.let {
|
||||
val latestChapter = MangaUpdates.getLatestChapter(it) ?: return@let
|
||||
val latestChapter = MangaUpdates.getLatestChapter(it)
|
||||
val timeSince = (System.currentTimeMillis() -
|
||||
(it.metadata.series.lastUpdated!!.timestamp * 1000)) / 1000
|
||||
|
||||
|
|
|
@ -43,9 +43,9 @@ class MangaUpdates {
|
|||
}
|
||||
|
||||
companion object {
|
||||
fun getLatestChapter(results: MangaUpdatesResponse.Results): Int? {
|
||||
return results.metadata.series.latestChapter
|
||||
?: results.record.chapter!!.substringAfterLast("-").trim().toIntOrNull()
|
||||
fun getLatestChapter(results: MangaUpdatesResponse.Results): String {
|
||||
return results.metadata.series.latestChapter?.toString()
|
||||
?: results.record.chapter!!.substringAfterLast("-").trim()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -503,7 +503,7 @@
|
|||
<string name="refresh_token_load_failed">Refresh Token : Failed to load Saved Token</string>
|
||||
<string name="refreshing_token_failed">Refreshing Token Failed</string>
|
||||
<string name="episode_release_countdown">Episode %1$d will be released in</string>
|
||||
<string name="chapter_release_timeout">Chapter %1$d has been available for</string>
|
||||
<string name="chapter_release_timeout">Chapter %1$s has been available for</string>
|
||||
<string name="time_format">%1$d days %2$d hrs %3$d mins %4$d secs</string>
|
||||
<string-array name="sort_by">
|
||||
<item>Score</item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue