From 01b46edf1ac3825b6be94cc6886231b656cdf0e7 Mon Sep 17 00:00:00 2001 From: Koitharu Date: Fri, 14 Jul 2023 11:41:52 +0300 Subject: [PATCH] Fix crash after feed update --- .../schabi/newpipe/local/feed/service/FeedLoadService.kt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/local/feed/service/FeedLoadService.kt b/app/src/main/java/org/schabi/newpipe/local/feed/service/FeedLoadService.kt index ff5734feb..bde301b92 100644 --- a/app/src/main/java/org/schabi/newpipe/local/feed/service/FeedLoadService.kt +++ b/app/src/main/java/org/schabi/newpipe/local/feed/service/FeedLoadService.kt @@ -95,13 +95,7 @@ class FeedLoadService : Service() { .doOnSubscribe { startForeground(NOTIFICATION_ID, notificationBuilder.build()) } - .subscribe { _, error -> - // 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") + .subscribe { _, error: Throwable? -> // explicitly mark error as nullable if (error != null) { Log.e(TAG, "Error while storing result", error) handleError(error)