Dependency updates

This commit is contained in:
inorichi
2018-02-18 20:02:31 +01:00
parent fc1f290b85
commit 49eb638e15
6 changed files with 24 additions and 24 deletions

View File

@ -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()) {

View File

@ -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>(),
}
}
}
}

View File

@ -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)

View File

@ -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
}
}
}