Do not add new account twice plus some minor changes

This commit is contained in:
Juha Heinanen
2022-05-17 22:15:03 +03:00
parent 470bd4f5a6
commit d3bd77f7e4
3 changed files with 2 additions and 3 deletions
@@ -113,7 +113,7 @@ class AccountActivity : AppCompatActivity() {
val config = try { val config = try {
URL(url).readText() URL(url).readText()
} catch (e: java.lang.Exception) { } catch (e: java.lang.Exception) {
Log.d(TAG, "Network request failed") Log.d(TAG, "Failed to get account configuration from network")
null null
} }
if (config != null && !ctx.isFinishing) { if (config != null && !ctx.isFinishing) {
@@ -73,7 +73,6 @@ class AccountsActivity : AppCompatActivity() {
newAorView.setText("") newAorView.setText("")
newAorView.hint = getString(R.string.user_domain) newAorView.hint = getString(R.string.user_domain)
newAorView.clearFocus() newAorView.clearFocus()
ua.add()
generateAccounts() generateAccounts()
alAdapter.notifyDataSetChanged() alAdapter.notifyDataSetChanged()
saveAccounts() saveAccounts()
@@ -541,7 +541,7 @@ class BaresipService: Service() {
R.drawable.dot_white R.drawable.dot_white
else else
R.drawable.dot_yellow R.drawable.dot_yellow
uas.add(UserAgent(uap)) uas.add(ua)
return return
} }