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