rename ChapterTable.chapterIndex to ChapterTable.sourceOrder

This commit is contained in:
Aria Moradi
2021-09-27 14:36:06 +03:30
parent bd465559fb
commit ab8a52faf3
8 changed files with 39 additions and 21 deletions

View File

@@ -27,6 +27,7 @@ data class ChapterDataClass(
/** last read page, zero means not read/no data */
val lastReadAt: Long,
// TODO(v0.6.0): rename to sourceOrder
/** this chapter's index, starts with 1 */
val index: Int,

View File

@@ -27,7 +27,7 @@ object ChapterTable : IntIdTable() {
val lastReadAt = long("last_read_at").default(0)
// index is reserved by a function
val chapterIndex = integer("index")
val sourceOrder = integer("source_order")
val isDownloaded = bool("is_downloaded").default(false)
@@ -48,7 +48,7 @@ fun ChapterTable.toDataClass(chapterEntry: ResultRow) =
chapterEntry[isBookmarked],
chapterEntry[lastPageRead],
chapterEntry[lastReadAt],
chapterEntry[chapterIndex],
chapterEntry[sourceOrder],
chapterEntry[isDownloaded],
chapterEntry[pageCount],
transaction { ChapterTable.select { manga eq chapterEntry[manga].value }.count().toInt() },