Fix "unsage use" warnings
This commit is contained in:
parent
8ce996e065
commit
a8fe2d7e83
1 changed files with 4 additions and 4 deletions
|
@ -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 a new issue