Compare commits
No commits in common. "fbcb428e96d66e9384b74f7b38a0bc22d88bc991" and "0eed9a8d070552a2e89ef1fa7f838559d0ea10a6" have entirely different histories.
fbcb428e96
...
0eed9a8d07
@ -44,6 +44,7 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
|
|||||||
// TODO: Dispatchers.IO not available in KMM, an alternative solution should be found
|
// TODO: Dispatchers.IO not available in KMM, an alternative solution should be found
|
||||||
CoroutineScope(Dispatchers.Main).launch {
|
CoroutineScope(Dispatchers.Main).launch {
|
||||||
updateApiVersion()
|
updateApiVersion()
|
||||||
|
dateUtils = DateUtils(apiMajorVersion)
|
||||||
reloadBadges()
|
reloadBadges()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -342,9 +343,6 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
|
|||||||
try {
|
try {
|
||||||
val response = api.login()
|
val response = api.login()
|
||||||
result = response?.isSuccess == true
|
result = response?.isSuccess == true
|
||||||
if (result) {
|
|
||||||
updateApiVersion()
|
|
||||||
}
|
|
||||||
} catch (cause: Throwable) {
|
} catch (cause: Throwable) {
|
||||||
Napier.e(cause.stackTraceToString(), tag = "RepositoryImpl.updateRemote")
|
Napier.e(cause.stackTraceToString(), tag = "RepositoryImpl.updateRemote")
|
||||||
}
|
}
|
||||||
@ -375,7 +373,6 @@ class Repository(private val api: SelfossApi, private val apiDetails: ApiDetails
|
|||||||
settings.putInt("apiVersionMajor", apiMajorVersion)
|
settings.putInt("apiVersionMajor", apiMajorVersion)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dateUtils = DateUtils(apiMajorVersion)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isNetworkAvailable() = isConnectionAvailable.value && !offlineOverride
|
fun isNetworkAvailable() = isConnectionAvailable.value && !offlineOverride
|
||||||
|
Loading…
Reference in New Issue
Block a user