Merge pull request #10229 from Koitharu/bugfix/feed_crash

Fix crash after feed update
This commit is contained in:
Tobi 2023-07-14 15:31:12 +02:00 committed by GitHub
commit 8cfba4003d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -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)