mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-12 12:08:56 +01:00
Add property to get the number of a page
This commit is contained in:
@@ -302,7 +302,7 @@ class Downloader(private val context: Context, private val provider: DownloadPro
|
||||
if (page.imageUrl == null)
|
||||
return Observable.just(page)
|
||||
|
||||
val filename = String.format("%03d", page.index + 1)
|
||||
val filename = String.format("%03d", page.number)
|
||||
val tmpFile = tmpDir.findFile("$filename.tmp")
|
||||
|
||||
// Delete temp file if it exists.
|
||||
|
||||
@@ -12,6 +12,9 @@ class Page(
|
||||
@Transient var uri: Uri? = null
|
||||
) : ProgressListener {
|
||||
|
||||
val number: Int
|
||||
get() = index + 1
|
||||
|
||||
@Transient lateinit var chapter: ReaderChapter
|
||||
|
||||
@Transient @Volatile var status: Int = 0
|
||||
|
||||
Reference in New Issue
Block a user