mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-30 11:43:01 -04:00
Fix detecting repo as user mirror when adding a repo URL with preceeding or trailing whitespace characters
This commit is contained in:
committed by
Torsten Grote
parent
b670858a38
commit
0a1297ff3d
@@ -104,7 +104,7 @@ class AddRepoActivity : AppCompatActivity() {
|
||||
}
|
||||
|
||||
private fun onFetchRepo(uriStr: String) {
|
||||
val uri = Uri.parse(uriStr)
|
||||
val uri = Uri.parse(uriStr.trim())
|
||||
if (repoManager.isSwapUri(uri)) {
|
||||
val i = Intent(this, SwapService::class.java).apply {
|
||||
data = uri
|
||||
@@ -112,7 +112,7 @@ class AddRepoActivity : AppCompatActivity() {
|
||||
ContextCompat.startForegroundService(this, i)
|
||||
} else {
|
||||
repoManager.abortAddingRepository()
|
||||
repoManager.fetchRepositoryPreview(uriStr, proxy = NetCipher.getProxy())
|
||||
repoManager.fetchRepositoryPreview(uri.toString(), proxy = NetCipher.getProxy())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user