mirror of
https://github.com/readrops/Readrops.git
synced 2025-02-02 19:56:50 +01:00
Add another case for sync result notification
This commit is contained in:
parent
1052b453a8
commit
46712f4c5e
@ -42,7 +42,6 @@ class SyncResultAnalyser(val context: Context, private val syncResults: Map<Acco
|
|||||||
} else if (feedsIdsForNewItems.size == 1) { // new items from only one feed from one account
|
} else if (feedsIdsForNewItems.size == 1) { // new items from only one feed from one account
|
||||||
val feed = Database.getInstance(context).feedDao().getFeedById(feedsIdsForNewItems.first())
|
val feed = Database.getInstance(context).feedDao().getFeedById(feedsIdsForNewItems.first())
|
||||||
title = feed?.name
|
title = feed?.name
|
||||||
contentText = syncResult.items.first().title
|
|
||||||
|
|
||||||
val target = GlideApp.with(context)
|
val target = GlideApp.with(context)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
@ -50,6 +49,10 @@ class SyncResultAnalyser(val context: Context, private val syncResults: Map<Acco
|
|||||||
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
.diskCacheStrategy(DiskCacheStrategy.ALL)
|
||||||
.submit()
|
.submit()
|
||||||
largeIcon = target.get()
|
largeIcon = target.get()
|
||||||
|
|
||||||
|
contentText = if (syncResult.items.size == 1)
|
||||||
|
syncResult.items.first().title
|
||||||
|
else context.getString(R.string.new_items, syncResult.items.size.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user