Fix: add entry to favorite when open from link on UrlImportableSource sources
This commit is contained in:
parent
f37a7b1580
commit
b6470d1072
1 changed files with 9 additions and 2 deletions
|
|
@ -175,7 +175,7 @@ class InterceptActivity : BaseActivity() {
|
||||||
|
|
||||||
private val galleryAdder = GalleryAdder()
|
private val galleryAdder = GalleryAdder()
|
||||||
|
|
||||||
suspend fun loadGallery(gallery: String) {
|
private suspend fun loadGallery(gallery: String) {
|
||||||
// Do not load gallery if already loading
|
// Do not load gallery if already loading
|
||||||
if (status.value is InterceptResult.Idle) {
|
if (status.value is InterceptResult.Idle) {
|
||||||
status.value = InterceptResult.Loading
|
status.value = InterceptResult.Loading
|
||||||
|
|
@ -199,7 +199,14 @@ class InterceptActivity : BaseActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun loadGalleryEnd(gallery: String, source: UrlImportableSource? = null) {
|
private suspend fun loadGalleryEnd(gallery: String, source: UrlImportableSource? = null) {
|
||||||
val result = galleryAdder.addGallery(this@InterceptActivity, gallery, forceSource = source)
|
val result = galleryAdder.addGallery(
|
||||||
|
this@InterceptActivity,
|
||||||
|
gallery,
|
||||||
|
// KMK -->
|
||||||
|
fav = true,
|
||||||
|
// KMK <--
|
||||||
|
forceSource = source,
|
||||||
|
)
|
||||||
|
|
||||||
status.value = when (result) {
|
status.value = when (result) {
|
||||||
is GalleryAddEvent.Success -> InterceptResult.Success(result.manga.id, result.manga, result.chapter)
|
is GalleryAddEvent.Success -> InterceptResult.Success(result.manga.id, result.manga, result.chapter)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue