mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-26 19:17:51 +02:00
Dependency updates
This commit is contained in:
@ -79,7 +79,7 @@ class MangaModelLoader : ModelLoader<Manga, InputStream> {
|
||||
* @param height the height of the view where the resource will be loaded.
|
||||
*/
|
||||
override fun buildLoadData(manga: Manga, width: Int, height: Int,
|
||||
options: Options?): ModelLoader.LoadData<InputStream>? {
|
||||
options: Options): ModelLoader.LoadData<InputStream>? {
|
||||
// Check thumbnail is not null or empty
|
||||
val url = manga.thumbnail_url
|
||||
if (url == null || url.isEmpty()) {
|
||||
|
@ -439,7 +439,8 @@ class MangaInfoController : NucleusController<MangaInfoPresenter>(),
|
||||
* @param i The shape index to apply. Defaults to circle crop transformation.
|
||||
*/
|
||||
private fun createShortcutForShape(i: Int = 0) {
|
||||
GlideApp.with(activity)
|
||||
if (activity == null) return
|
||||
GlideApp.with(activity!!)
|
||||
.asBitmap()
|
||||
.load(presenter.manga)
|
||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||
@ -534,4 +535,4 @@ class MangaInfoController : NucleusController<MangaInfoPresenter>(),
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import kotlinx.coroutines.experimental.android.UI
|
||||
import kotlinx.coroutines.experimental.launch
|
||||
|
||||
fun launchUI(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
launch(UI, CoroutineStart.DEFAULT, block)
|
||||
launch(UI, CoroutineStart.DEFAULT, null, block)
|
||||
|
||||
fun launchNow(block: suspend CoroutineScope.() -> Unit): Job =
|
||||
launch(UI, CoroutineStart.UNDISPATCHED, block)
|
||||
launch(UI, CoroutineStart.UNDISPATCHED, null, block)
|
||||
|
@ -55,10 +55,10 @@ class StateImageViewTarget(view: ImageView,
|
||||
super.onLoadCleared(placeholder)
|
||||
}
|
||||
|
||||
override fun onResourceReady(resource: Drawable?, transition: Transition<in Drawable>?) {
|
||||
override fun onResourceReady(resource: Drawable, transition: Transition<in Drawable>?) {
|
||||
progress?.gone()
|
||||
view.scaleType = imageScaleType
|
||||
super.onResourceReady(resource, transition)
|
||||
this.resource = resource
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user