Skip to content

Commit

Permalink
fix: "Failed to check for updates" warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhenwinch committed May 25, 2024
1 parent b4053aa commit 689217f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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!!
Expand Down

0 comments on commit 689217f

Please sign in to comment.