mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 16:40:32 +00:00
Fix "unsage use" warnings
This commit is contained in:
parent
8ce996e065
commit
a8fe2d7e83
@ -211,10 +211,10 @@ class FeedLoadManager(private val context: Context) {
|
|||||||
for (notification in list) {
|
for (notification in list) {
|
||||||
when {
|
when {
|
||||||
notification.isOnNext -> {
|
notification.isOnNext -> {
|
||||||
val subscriptionId = notification.value.uid
|
val subscriptionId = notification.value!!.uid
|
||||||
val info = notification.value.listInfo
|
val info = notification.value!!.listInfo
|
||||||
|
|
||||||
notification.value.newStreamsCount = countNewStreams(info.relatedItems)
|
notification.value!!.newStreamsCount = countNewStreams(info.relatedItems)
|
||||||
feedDatabaseManager.upsertAll(subscriptionId, info.relatedItems)
|
feedDatabaseManager.upsertAll(subscriptionId, info.relatedItems)
|
||||||
subscriptionManager.updateFromInfo(subscriptionId, info)
|
subscriptionManager.updateFromInfo(subscriptionId, info)
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ class FeedLoadManager(private val context: Context) {
|
|||||||
}
|
}
|
||||||
notification.isOnError -> {
|
notification.isOnError -> {
|
||||||
val error = notification.error
|
val error = notification.error
|
||||||
feedResultsHolder.addError(error)
|
feedResultsHolder.addError(error!!)
|
||||||
|
|
||||||
if (error is FeedLoadService.RequestException) {
|
if (error is FeedLoadService.RequestException) {
|
||||||
feedDatabaseManager.markAsOutdated(error.subscriptionId)
|
feedDatabaseManager.markAsOutdated(error.subscriptionId)
|
||||||
|
Loading…
Reference in New Issue
Block a user