Make MergedMangaReference immutable

This commit is contained in:
Jobobby04
2023-02-09 14:54:52 -05:00
parent eecf7fd1fb
commit ab0995ab9f
13 changed files with 68 additions and 71 deletions
+2 -2
View File
@@ -153,7 +153,7 @@ object EXHMigrations {
mergedManga.first.copy(url = it)
} ?: mergedManga.first
mergedMangaReferences += MergedMangaReference(
id = null,
id = -1,
isInfoManga = false,
getChapterUpdates = false,
chapterSortMode = 0,
@@ -168,7 +168,7 @@ object EXHMigrations {
mergedManga.second.children.distinct().forEachIndexed { index, mangaSource ->
val load = mangaSource.load() ?: return@forEachIndexed
mergedMangaReferences += MergedMangaReference(
id = null,
id = -1,
isInfoManga = index == 0,
getChapterUpdates = true,
chapterSortMode = 0,
@@ -2,31 +2,31 @@ package exh.merged.sql.models
data class MergedMangaReference(
// Tag identifier, unique
var id: Long?,
val id: Long,
// The manga where it grabs the updated manga info
var isInfoManga: Boolean,
val isInfoManga: Boolean,
// If false the manga will not grab chapter updates
var getChapterUpdates: Boolean,
val getChapterUpdates: Boolean,
// The mode in which the chapters are handeled, only set in the main merge reference
var chapterSortMode: Int,
val chapterSortMode: Int,
// chapter priority the deduplication uses
var chapterPriority: Int,
val chapterPriority: Int,
// Set if you want it to download new chapters
var downloadChapters: Boolean,
val downloadChapters: Boolean,
// merged manga this reference is attached to
var mergeId: Long?,
val mergeId: Long?,
// merged manga url this reference is attached to
val mergeUrl: String,
// manga id included in the merge this reference is attached to
var mangaId: Long?,
val mangaId: Long?,
// manga url included in the merge this reference is attached to
val mangaUrl: String,