From 8f5cc6efa4f5a10a313fa5aed29523e4d8c172ba Mon Sep 17 00:00:00 2001 From: davidoskky Date: Wed, 17 Aug 2022 20:12:25 +0200 Subject: [PATCH] Do not fake offline mode when updating remote --- .../amine/apps/readerforselfossv2/repository/RepositoryImpl.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt b/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt index 2ab5bf7..d6b1f16 100644 --- a/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt +++ b/shared/src/commonMain/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryImpl.kt @@ -322,7 +322,8 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails suspend fun updateRemote(): Boolean { var response = false - if (isConnectionAvailable.value && !offlineOverride) { + offlineOverride = false + if (isConnectionAvailable.value) { response = api.update()?.isSuccess == true } return response