From 689217f0dc9bfa45d177ebf34b9456c31d2884b6 Mon Sep 17 00:00:00 2001 From: rhenwinch Date: Sat, 25 May 2024 12:05:55 +0800 Subject: [PATCH] fix: "Failed to check for updates" warning. --- .../data/configuration/DefaultAppConfigurationManager.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/data/configuration/src/main/kotlin/com/flixclusive/data/configuration/DefaultAppConfigurationManager.kt b/data/configuration/src/main/kotlin/com/flixclusive/data/configuration/DefaultAppConfigurationManager.kt index 33bbc14a1..1c0b18989 100644 --- a/data/configuration/src/main/kotlin/com/flixclusive/data/configuration/DefaultAppConfigurationManager.kt +++ b/data/configuration/src/main/kotlin/com/flixclusive/data/configuration/DefaultAppConfigurationManager.kt @@ -7,7 +7,6 @@ import com.flixclusive.core.util.common.configuration.GITHUB_REPOSITORY import com.flixclusive.core.util.common.configuration.GITHUB_USERNAME import com.flixclusive.core.util.common.dispatcher.di.ApplicationScope import com.flixclusive.core.util.common.resource.Resource -import com.flixclusive.core.util.common.ui.UiText import com.flixclusive.core.util.exception.catchInternetRelatedException import com.flixclusive.core.util.log.errorLog import com.flixclusive.model.configuration.AppConfig @@ -117,6 +116,8 @@ internal class DefaultAppConfigurationManager @Inject constructor( return _updateStatus.emit(UpdateStatus.Outdated) } + + return _updateStatus.emit(UpdateStatus.UpToDate) } else { val isNeedingAnUpdate = appConfig!!.build != -1L && appConfig!!.build > currentAppBuild!!.build @@ -129,8 +130,6 @@ internal class DefaultAppConfigurationManager @Inject constructor( return _updateStatus.emit(UpdateStatus.UpToDate) } - - return _updateStatus.emit(UpdateStatus.Error(UiText.StringResource(UtilR.string.failed_checking_for_updates))) } catch (e: Exception) { errorLog(e.stackTraceToString()) val errorMessageId = e.catchInternetRelatedException().error!!