Compare commits
3 Commits
a029d8a7dc
...
4ad4a23ed8
Author | SHA1 | Date | |
---|---|---|---|
4ad4a23ed8 | |||
d8c215eacc | |||
2b446ab22b |
@ -62,8 +62,7 @@ kotlin {
|
||||
}
|
||||
val androidMain by getting {
|
||||
dependencies {
|
||||
implementation("com.squareup.okhttp3:okhttp:4.10.0")
|
||||
implementation("io.ktor:ktor-client-okhttp:2.2.4")
|
||||
implementation("io.ktor:ktor-client-okhttp:2.1.1")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
|
||||
|
||||
// Sql
|
||||
|
@ -51,6 +51,7 @@ class SelfossApi(private val appSettingsService: AppSettingsService) {
|
||||
prettyPrint = true
|
||||
isLenient = true
|
||||
ignoreUnknownKeys = true
|
||||
explicitNulls = false
|
||||
})
|
||||
}
|
||||
install(Logging) {
|
||||
@ -98,8 +99,8 @@ class SelfossApi(private val appSettingsService: AppSettingsService) {
|
||||
}
|
||||
|
||||
// Api version was introduces after the POST login, so when there is a version, it should be available
|
||||
fun shouldHavePostLogin() = appSettingsService.getApiVersion() != -1
|
||||
fun hasLoginInfo() =
|
||||
private fun shouldHavePostLogin() = appSettingsService.getApiVersion() != -1
|
||||
private fun hasLoginInfo() =
|
||||
appSettingsService.getUserName().isNotEmpty() && appSettingsService.getPassword()
|
||||
.isNotEmpty()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user