Commit b993651f authored by Daniel Wolf's avatar Daniel Wolf
Browse files

Updated tasker activity to be more concise

parent df3a0fbe
......@@ -74,11 +74,11 @@ class ConfigureActivity : BaseActivity() {
"start" -> {
actionType.setSelection(0)
startIfRunning.isChecked = settings.getBoolean(TaskerHelper.DATA_KEY_STARTIFRUNNING, true)
useServersFromConfig.isChecked =
!settings.containsKey(TaskerHelper.DATA_KEY_PRIMARYSERVER) && !settings.containsKey(
useCustomServer.isChecked =
settings.containsKey(TaskerHelper.DATA_KEY_PRIMARYSERVER) || settings.containsKey(
BackgroundVpnConfigureActivity.extraKeyServerConfig
)
if (!useServersFromConfig.isChecked) {
if (useCustomServer.isChecked) {
if (settings.containsKey(TaskerHelper.DATA_KEY_PRIMARYSERVER)) {
serverType.setSelection(0)
primaryServer.setText(settings.getString(TaskerHelper.DATA_KEY_PRIMARYSERVER))
......@@ -110,8 +110,8 @@ class ConfigureActivity : BaseActivity() {
}
private fun createLayout() {
useServersFromConfig.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) {
useCustomServer.setOnCheckedChangeListener { _, isChecked ->
if (!isChecked) {
serverConfigWrap.visibility = View.GONE
serverType.visibility = View.GONE
} else {
......@@ -213,7 +213,7 @@ class ConfigureActivity : BaseActivity() {
)
if (action == "start") {
settings.putBoolean(TaskerHelper.DATA_KEY_STARTIFRUNNING, startIfRunning.isChecked)
if (!useServersFromConfig.isChecked) {
if (useCustomServer.isChecked) {
if (primaryServerWrap.error == null &&
secondaryServerWrap.error == null
) {
......
......@@ -49,10 +49,10 @@
<CheckBox
android:layout_width="wrap_content"
android:text="@string/tasker_use_default_configuration"
android:text="@string/tasker_use_custom_server"
android:textColor="?android:attr/textColor"
android:checked="true"
android:id="@+id/useServersFromConfig"
android:checked="false"
android:id="@+id/useCustomServer"
android:layout_height="wrap_content"/>
<Spinner
......
<?xml version='1.0' encoding='UTF-8'?>
<resources><string name="tasker_start_if_running">Starten, auch wenn es bereits läuft (überschreibt möglicherweise laufende Konfiguration)</string>
<string name="tasker_use_default_configuration">Benutze die im Hauptmenü angegebenen Server</string>
<string name="tasker_use_custom_server">Angepasste Server nutzen</string>
<string name="tasker_action">Aktion</string>
<string name="tasker_start_app_custom_url">Starte die app mit %1s (Modus: %2s)</string>
<string name="tasker_start_app_custom_urls">Starte die app mit %1s and %2s (Modus: %3s)</string>
......
<?xml version='1.0' encoding='UTF-8'?>
<resources><string name="tasker_start_if_running">Memulai walaupun sudah berjalan (dapat mengesampingkan konfigurasi)</string>
<string name="tasker_use_default_configuration">Gunakan server yang dipilih dalam menu</string>
<string name="tasker_action">Tindakan</string>
<string name="tasker_start_app_custom_url">Mulai aplikasi dengan %1s (Mode: %2s)</string>
<string name="tasker_start_app_custom_urls">Mulai aplikasi dengan %1s dan %2s (Mode: %3s)</string>
......
<?xml version='1.0' encoding='UTF-8'?>
<resources><string name="tasker_start_if_running">Avvia anche se già in esecuzione (potrebbe sovrascrivere la configurazione)</string>
<string name="tasker_use_default_configuration">Usa i server selezionati nel menu</string>
<string name="tasker_action">Azione</string>
<string name="tasker_start_app_custom_url">Avvia l\'app con %1s (Modalità: %2s)</string>
<string name="tasker_start_app_custom_urls">Avvia l\'app con %1s e %2s (Modalità: %3s)</string>
......
<?xml version='1.0' encoding='UTF-8'?>
<resources><string name="tasker_start_if_running">Start, zelfs als het al actief is (kan configuratie overschrijven)</string>
<string name="tasker_use_default_configuration">Gebruik de servers die in het menu zijn geselecteerd</string>
<string name="tasker_action">Actie</string>
<string name="tasker_start_app_custom_url">Start de app met %1s (modus: %2s)</string>
<string name="tasker_start_app_custom_urls">Start de app met %1s en %2s (modus: %3s)</string>
......
<?xml version='1.0' encoding='UTF-8'?>
<resources><string name="tasker_start_if_running">Iniciar, mesmo que já esteja em execução (pode sobrescrever a configuração atual)</string>
<string name="tasker_use_default_configuration">Usar os servidores selecionados no menu</string>
<string name="tasker_action">Ação</string>
<string name="tasker_start_app_custom_url">Inicie o aplicativo com %1s (modo: %2s)</string>
<string name="tasker_start_app_custom_urls">Inicie o aplicativo com %1s e %2s (modo: %3s)</string>
......
<?xml version='1.0' encoding='UTF-8'?>
<resources><string name="tasker_start_if_running">Запустить, даже если уже запущен (может изменить конфигурацию)</string>
<string name="tasker_use_default_configuration">Использовать сервер, выбранный в меню</string>
<string name="tasker_action">Действие</string>
<string name="tasker_start_app_custom_url">Запуск с %1s (Mode: %2s)</string>
<string name="tasker_start_app_custom_urls">Запуск с %1s и %2s (Mode: %3s)</string>
......
<?xml version='1.0' encoding='UTF-8'?>
<resources><string name="tasker_start_if_running">Zaten çalışıyor olsa bile başlat (yapılandırmayı geçersiz kılabilir)</string>
<string name="tasker_use_default_configuration">Menüde seçilen sunucuları kullanın</string>
<string name="tasker_action">Eylem</string>
<string name="tasker_start_app_custom_url">%1s ile uygulamayı başlat (Kip: %2s)</string>
<string name="tasker_start_app_custom_urls">%1s ve %2s ile uygulamayı başlat (Kip: %3s)</string>
......
......@@ -2,7 +2,7 @@
<resources>
<string name="tasker_start_if_running">Start even if already running (may override configuration)</string>
<string name="tasker_use_default_configuration">Use the servers selected in the menu</string>
<string name="tasker_use_custom_server">Specify custom servers</string>
<string name="tasker_action">Action</string>
<string name="tasker_start_app_custom_url">Start the app with %1s (Mode: %2s)</string>
<string name="tasker_start_app_custom_urls">Start the app with %1s and %2s (Mode: %3s)</string>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment