Fixed Discord not loading after first start
This commit is contained in:
parent
2d21cc06a3
commit
d5aea5d98c
2 changed files with 3 additions and 3 deletions
|
@ -95,8 +95,8 @@ class MainActivity : Activity() {
|
|||
else if (sPrefs.getString("discordBranch", "") == "ptb") wv!!.loadUrl("https://ptb.discord.com/app")
|
||||
else if (sPrefs.getString("discordBranch", "") == "canary") wv!!.loadUrl("https://canary.discord.com/app")
|
||||
else {
|
||||
finish()
|
||||
startActivity(Intent(this@MainActivity, WelcomeActivity::class.java))
|
||||
finishActivity(0)
|
||||
}
|
||||
}
|
||||
checkUpdates()
|
||||
|
@ -146,7 +146,7 @@ class MainActivity : Activity() {
|
|||
|
||||
fun handleUrl(url: Uri?) {
|
||||
if (url != null) {
|
||||
if (url.authority != "discord.com") return
|
||||
if (url.authority != "discord.com" || url.authority != "ptb.discord.com" || url.authority != "canary.discord.com") return
|
||||
if (!wvInitialized) {
|
||||
wv!!.loadUrl(url.toString())
|
||||
} else {
|
||||
|
|
|
@ -57,8 +57,8 @@ class WelcomeActivity : AppCompatActivity() {
|
|||
if (findViewById<CheckBox>(R.id.allow_custom_location).isChecked && findViewById<EditText>(R.id.custom_location).text.isNotBlank()) editor.putString("vencordLocation", findViewById<EditText>(R.id.custom_location).text.toString())
|
||||
|
||||
editor.apply()
|
||||
startActivity(Intent(this@WelcomeActivity, MainActivity::class.java))
|
||||
finish()
|
||||
startActivity(Intent(this@WelcomeActivity, MainActivity::class.java))
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue