mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 17:11:54 +01:00
Fixes to notifactions icons and loading reader
This commit is contained in:
parent
24d2245972
commit
f63db1cc2c
@ -52,6 +52,14 @@ interface ChapterQueries : DbProvider {
|
|||||||
.build())
|
.build())
|
||||||
.prepare()
|
.prepare()
|
||||||
|
|
||||||
|
fun getChapter(url: String, mangaId: Long) = db.get()
|
||||||
|
.`object`(Chapter::class.java)
|
||||||
|
.withQuery(Query.builder()
|
||||||
|
.table(ChapterTable.TABLE)
|
||||||
|
.where("${ChapterTable.COL_URL} = ? AND ${ChapterTable.COL_MANGA_ID} = ?")
|
||||||
|
.whereArgs(url, mangaId)
|
||||||
|
.build())
|
||||||
|
.prepare()
|
||||||
|
|
||||||
fun insertChapter(chapter: Chapter) = db.put().`object`(chapter).prepare()
|
fun insertChapter(chapter: Chapter) = db.put().`object`(chapter).prepare()
|
||||||
|
|
||||||
|
@ -456,7 +456,8 @@ class LibraryUpdateService(
|
|||||||
setSmallIcon(R.drawable.ic_book_white_24dp)
|
setSmallIcon(R.drawable.ic_book_white_24dp)
|
||||||
try {
|
try {
|
||||||
val icon = GlideApp.with(this@LibraryUpdateService)
|
val icon = GlideApp.with(this@LibraryUpdateService)
|
||||||
.asBitmap().load(manga).centerCrop().circleCrop().submit().get()
|
.asBitmap().load(manga).dontTransform().centerCrop().circleCrop()
|
||||||
|
.override(256, 256).submit().get()
|
||||||
setLargeIcon(icon)
|
setLargeIcon(icon)
|
||||||
}
|
}
|
||||||
catch (e: Exception) { }
|
catch (e: Exception) { }
|
||||||
|
@ -153,7 +153,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chapterUrl.isEmpty()) presenter.init(manga, chapter)
|
if (chapter > -1) presenter.init(manga, chapter)
|
||||||
else presenter.init(manga, chapterUrl)
|
else presenter.init(manga, chapterUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ class ReaderPresenter(
|
|||||||
if (!needsInit()) return
|
if (!needsInit()) return
|
||||||
val context = Injekt.get<Application>()
|
val context = Injekt.get<Application>()
|
||||||
val db = DatabaseHelper(context)
|
val db = DatabaseHelper(context)
|
||||||
val chapterId = db.getChapter(chapterUrl).executeAsBlocking()?.id
|
val chapterId = db.getChapter(chapterUrl, mangaId).executeAsBlocking()?.id
|
||||||
if (chapterId != null)
|
if (chapterId != null)
|
||||||
init(mangaId, chapterId)
|
init(mangaId, chapterId)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user