Minor changes

This commit is contained in:
len
2017-08-15 15:06:21 +02:00
parent a12a34e3bb
commit e8b432485d
4 changed files with 26 additions and 41 deletions

View File

@ -51,7 +51,7 @@ class DbOpenHelper(context: Context)
if (oldVersion < 4) {
db.execSQL(ChapterTable.bookmarkUpdateQuery)
}
if (oldVersion < 5){
if (oldVersion < 5) {
db.execSQL(ChapterTable.addScanlator)
}
}

View File

@ -31,7 +31,8 @@ class ChapterImpl : Chapter {
if (other == null || javaClass != other.javaClass) return false
val chapter = other as Chapter
//forces updates on manga if scanlator changes. This will allow existing manga in library with scanlator to update
// Forces updates on manga if scanlator changes. This will allow existing manga in library
// with scanlator to update.
return url == chapter.url && scanlator == chapter.scanlator
}

View File

@ -14,7 +14,7 @@ object ChapterTable {
const val COL_READ = "read"
const val COL_SCANLATOR ="scanlator"
const val COL_SCANLATOR = "scanlator"
const val COL_BOOKMARK = "bookmark"
@ -55,7 +55,7 @@ object ChapterTable {
val bookmarkUpdateQuery: String
get() = "ALTER TABLE $TABLE ADD COLUMN $COL_BOOKMARK BOOLEAN DEFAULT FALSE"
val addScanlator:String
get ()= "ALTER TABLE $TABLE ADD COLUMN $COL_SCANLATOR TEXT DEFAULT"
val addScanlator: String
get() = "ALTER TABLE $TABLE ADD COLUMN $COL_SCANLATOR TEXT DEFAULT NULL"
}