mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-10-14 19:27:09 -04:00
Stores: two compile fixes in the shared net and login code
This commit is contained in:
1 parent
f467bb22e8
commit
0687e3477e
2 files changed
+6
-4
No files matched your search
@@ -287,7 +287,7 @@ class StoreLoginActivity : ComponentActivity() {
|
||||
|
||||
private fun settle(problem: String?) {
|
||||
runOnUiThread {
|
||||
if (problem == null) { StoresState.refresh(this); finish(); return }
|
||||
if (problem == null) { StoresState.refresh(this); finish(); return@runOnUiThread }
|
||||
captured.set(false)
|
||||
if (!isFinishing && !isDestroyed) android.widget.Toast.makeText(this, problem, android.widget.Toast.LENGTH_LONG).show()
|
||||
reloadLogin()
|
||||
|
||||
@@ -106,9 +106,11 @@ object StoreLog {
|
||||
fun redactUrl(url: String?): String? {
|
||||
if (url == null) return null
|
||||
return try {
|
||||
var out = url
|
||||
out.indexOf('#').takeIf { it >= 0 }?.let { out = out.substring(0, it) }
|
||||
out.indexOf('?').takeIf { it >= 0 }?.let { out = out.substring(0, it) }
|
||||
var out: String = url
|
||||
val hash = out.indexOf('#')
|
||||
if (hash >= 0) out = out.substring(0, hash)
|
||||
val q = out.indexOf('?')
|
||||
if (q >= 0) out = out.substring(0, q)
|
||||
val scheme = out.indexOf("://")
|
||||
if (scheme >= 0) {
|
||||
val authStart = scheme + 3
|
||||
|
||||
Reference in new issue
Block a user