fix: preserve mobile auth form while editing
This commit is contained in:
@@ -10,8 +10,8 @@ android {
|
||||
applicationId = "xyz.kusoft.tradebotmonitor"
|
||||
minSdk = 26
|
||||
targetSdk = 37
|
||||
versionCode = 22
|
||||
versionName = "0.5.0"
|
||||
versionCode = 23
|
||||
versionName = "0.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-1
@@ -203,7 +203,7 @@ class MainActivity : Activity() {
|
||||
|
||||
private fun shouldRenderAfterRefresh(silent: Boolean, hadSnapshot: Boolean, hadError: Boolean, trainingChanged: Boolean): Boolean {
|
||||
val focused = contentHost.findFocus()
|
||||
if (activeTab == "settings" && focused is EditText) {
|
||||
if (focused is EditText) {
|
||||
return false
|
||||
}
|
||||
if (!silent) {
|
||||
@@ -502,6 +502,8 @@ class MainActivity : Activity() {
|
||||
"Сохранить" to {
|
||||
prefs.apiBaseUrl = apiInput.text.toString()
|
||||
prefs.commandToken = tokenInput.text.toString()
|
||||
apiInput.clearFocus()
|
||||
tokenInput.clearFocus()
|
||||
toast("Подключение сохранено")
|
||||
refreshData(silent = false)
|
||||
},
|
||||
@@ -1287,6 +1289,8 @@ class MainActivity : Activity() {
|
||||
"Подключиться" to {
|
||||
prefs.apiBaseUrl = apiInput.text.toString()
|
||||
prefs.commandToken = tokenInput.text.toString()
|
||||
apiInput.clearFocus()
|
||||
tokenInput.clearFocus()
|
||||
toast("Доступ сохранен, проверяю API")
|
||||
refreshData(silent = false)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user