Default to http for pre-configured syncs
When a user had configured a sync server before, it had no protocol specified. This commit "restores" the previous behaviour of using http by default.
This commit is contained in:
committed by
Koitharu
parent
58cdc9f29a
commit
249c8377bd
@@ -30,7 +30,11 @@ class SyncSettings(
|
|||||||
@set:WorkerThread
|
@set:WorkerThread
|
||||||
var syncURL: String
|
var syncURL: String
|
||||||
get() = account?.let {
|
get() = account?.let {
|
||||||
accountManager.getUserData(it, KEY_SYNC_URL)
|
val sync_url = accountManager.getUserData(it, KEY_SYNC_URL)
|
||||||
|
if ( !sync_url.startsWith("http://") && !sync_url.startsWith("https://") ) {
|
||||||
|
return "http://$sync_url"
|
||||||
|
}
|
||||||
|
return sync_url
|
||||||
}.ifNullOrEmpty { defaultSyncUrl }
|
}.ifNullOrEmpty { defaultSyncUrl }
|
||||||
set(value) {
|
set(value) {
|
||||||
account?.let {
|
account?.let {
|
||||||
|
|||||||
Reference in New Issue
Block a user