mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-22 23:00:56 +01:00
Do not crash
This commit is contained in:
parent
580cc49b1b
commit
f23682f538
@ -1,6 +1,7 @@
|
||||
package de.danoeh.antennapod.adapter;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.View;
|
||||
@ -39,13 +40,13 @@ class CoverTarget extends CustomViewTarget<ImageView, Drawable> {
|
||||
ImageView imgvCover = cover.get();
|
||||
if (fallbackUri != null && txtvPlaceholder != null && imgvCover != null) {
|
||||
MainActivity activity = mainActivity.get();
|
||||
Glide.with(activity)
|
||||
new Handler().post(() -> Glide.with(activity)
|
||||
.load(fallbackUri)
|
||||
.apply(new RequestOptions()
|
||||
.diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY)
|
||||
.fitCenter()
|
||||
.dontAnimate())
|
||||
.into(new CoverTarget(null, txtvPlaceholder, imgvCover, activity));
|
||||
.diskCacheStrategy(ApGlideSettings.AP_DISK_CACHE_STRATEGY)
|
||||
.fitCenter()
|
||||
.dontAnimate())
|
||||
.into(new CoverTarget(null, txtvPlaceholder, imgvCover, activity)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ project.ext {
|
||||
eventbusVersion = "2.4.0"
|
||||
flattr4jVersion = "2.14"
|
||||
glideVersion = "4.8.0"
|
||||
glideOkhttpIntegrationVersion = "1.5.0"
|
||||
glideOkhttpIntegrationVersion = "4.8.0"
|
||||
iconifyVersion = "2.2.2"
|
||||
jsoupVersion = "1.11.2"
|
||||
materialDialogsVersion = "0.9.0.2"
|
||||
|
Loading…
Reference in New Issue
Block a user