mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
fix: webDav服务器的config和webDavConfig定义不同
This commit is contained in:
parent
bfd94969e3
commit
73d2f25ce5
@ -44,7 +44,7 @@ data class Server(
|
||||
}
|
||||
|
||||
fun getWebDavConfig(): WebDavConfig? {
|
||||
return GSON.fromJsonObject<WebDavConfig>(config).getOrNull()
|
||||
return if (type == TYPE.WEBDAV) GSON.fromJsonObject<WebDavConfig>(config).getOrNull() else null
|
||||
}
|
||||
|
||||
@Parcelize
|
||||
|
@ -26,7 +26,7 @@ data class Authorization(
|
||||
serverID ?: throw NoStackTraceException("Unexpected server ID")
|
||||
appDb.serverDao.get(serverID)?.getWebDavConfig().run {
|
||||
data = Credentials.basic(username, password, charset)
|
||||
}
|
||||
} ?: throw WebDavException("Unexpected WebDav Authorization")
|
||||
}
|
||||
|
||||
}
|
@ -27,7 +27,7 @@ class ServerConfigDialog : BaseDialogFragment(R.layout.dialog_webdav_server, tru
|
||||
|
||||
private val serverUi = listOf(
|
||||
RowUi("url"),
|
||||
RowUi("user"),
|
||||
RowUi("username"),
|
||||
RowUi("password", RowUi.Type.password)
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user