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