fix chapter restore order

This commit is contained in:
Aria Moradi
2021-08-26 01:28:42 +04:30
parent b81075f4a7
commit fd8fa9f3ef

View File

@@ -97,7 +97,7 @@ object ProtoBackupImport : ProtoBackupBase() {
backupManga: BackupManga,
backupCategories: List<BackupCategory>,
categoryMapping: Map<Int, Int>
) { // TODO
) {
val manga = backupManga.getMangaImpl()
val chapters = backupManga.getChaptersImpl()
val categories = backupManga.categories
@@ -147,7 +147,7 @@ object ProtoBackupImport : ProtoBackupBase() {
}.value
// insert chapter data
chapters.forEach { chapter ->
chapters.reversed().forEach { chapter ->
ChapterTable.insert {
it[url] = chapter.url
it[name] = chapter.name