Check feed icon url nullability

This commit is contained in:
Shinokuni 2020-02-15 13:37:26 +01:00
parent 4f2618021e
commit 54566bbc4e
1 changed files with 9 additions and 6 deletions

View File

@ -43,12 +43,15 @@ class SyncResultAnalyser(val context: Context, private val syncResults: Map<Acco
val feed = database.feedDao().getFeedById(feedsIdsForNewItems.first())
title = feed?.name
feed?.iconUrl?.let {
val target = GlideApp.with(context)
.asBitmap()
.load(feed?.iconUrl)
.load(it)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.submit()
largeIcon = target.get()
}
contentText = if (syncResult.items.size == 1)
syncResult.items.first().title