mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-04 17:42:14 +01:00
Fix crash after feed update
This commit is contained in:
parent
f8599d17c2
commit
01b46edf1a
@ -95,13 +95,7 @@ class FeedLoadService : Service() {
|
|||||||
.doOnSubscribe {
|
.doOnSubscribe {
|
||||||
startForeground(NOTIFICATION_ID, notificationBuilder.build())
|
startForeground(NOTIFICATION_ID, notificationBuilder.build())
|
||||||
}
|
}
|
||||||
.subscribe { _, error ->
|
.subscribe { _, error: Throwable? -> // explicitly mark error as nullable
|
||||||
// There seems to be a bug in the kotlin plugin as it tells you when
|
|
||||||
// building that this can't be null:
|
|
||||||
// "Condition 'error != null' is always 'true'"
|
|
||||||
// However it can indeed be null
|
|
||||||
// The suppression may be removed in further versions
|
|
||||||
@Suppress("SENSELESS_COMPARISON")
|
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
Log.e(TAG, "Error while storing result", error)
|
Log.e(TAG, "Error while storing result", error)
|
||||||
handleError(error)
|
handleError(error)
|
||||||
|
Loading…
Reference in New Issue
Block a user