From f5e2aef90f1f52129b4a4a17f1fc6bbb28af44fb Mon Sep 17 00:00:00 2001 From: vanitasvitae Date: Mon, 20 Jun 2016 10:51:20 +0200 Subject: [PATCH] Added some more preference summaries --- .../diaspora_android/activity/MainActivity.java | 4 ++-- .../activity/SettingsActivity.java | 11 +++-------- app/src/main/res/values-de/strings-preferences.xml | 10 +++++++++- app/src/main/res/values-de/strings.xml | 1 - app/src/main/res/values/strings-preferences.xml | 12 +++++++++++- app/src/main/res/values/strings.xml | 1 - app/src/main/res/xml/preferences.xml | 14 +++++++++----- 7 files changed, 34 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java b/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java index 5b5c9b15..54c45bef 100644 --- a/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java +++ b/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java @@ -109,7 +109,7 @@ public class MainActivity extends AppCompatActivity private static final int REQUEST_CODE_ASK_PERMISSIONS = 123; public static final int REQUEST_CODE_ASK_PERMISSIONS_SAVE_IMAGE = 124; public static final int REQUEST_CODE_SETTINGS = 125; - public static final int RESULT_CODE_CHANGE_POD = 130; + public static final int RESULT_CODE_CHANGE_ACCOUNT = 130; public static final String URL_MESSAGE = "URL_MESSAGE"; private App app; @@ -412,7 +412,7 @@ public class MainActivity extends AppCompatActivity if(resultCode == Activity.RESULT_OK) { String url = data.getStringExtra(URL_MESSAGE); webView.loadUrl(url); - } else if(resultCode == RESULT_CODE_CHANGE_POD) { + } else if(resultCode == RESULT_CODE_CHANGE_ACCOUNT) { app.resetPodData(webView); Helpers.animateToActivity(MainActivity.this, PodSelectionActivity.class, true); } diff --git a/app/src/main/java/com/github/dfa/diaspora_android/activity/SettingsActivity.java b/app/src/main/java/com/github/dfa/diaspora_android/activity/SettingsActivity.java index 5d20d5ef..e3755482 100644 --- a/app/src/main/java/com/github/dfa/diaspora_android/activity/SettingsActivity.java +++ b/app/src/main/java/com/github/dfa/diaspora_android/activity/SettingsActivity.java @@ -5,21 +5,16 @@ import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; -import android.content.res.Resources; import android.os.Bundle; -import android.preference.CheckBoxPreference; import android.preference.EditTextPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceActivity; import android.preference.PreferenceScreen; -import android.support.v4.content.LocalBroadcastManager; -import android.util.Log; import com.github.dfa.diaspora_android.App; import com.github.dfa.diaspora_android.R; import com.github.dfa.diaspora_android.data.AppSettings; -import com.github.dfa.diaspora_android.util.Helpers; /** * @author vanitas @@ -85,15 +80,15 @@ public class SettingsActivity extends PreferenceActivity implements SharedPrefer results.putExtra(MainActivity.URL_MESSAGE, "https://" + podDomain + "/contacts"); setResult(Activity.RESULT_OK, results); finish(); - case "pref_key_change_pod": + case "pref_key_change_account": new AlertDialog.Builder(SettingsActivity.this) .setTitle(getString(R.string.confirmation)) - .setMessage(getString(R.string.change_pod_warning)) + .setMessage(getString(R.string.pref_warning_change_account)) .setNegativeButton(android.R.string.no, null) .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { - setResult(MainActivity.RESULT_CODE_CHANGE_POD); + setResult(MainActivity.RESULT_CODE_CHANGE_ACCOUNT); finish(); } }) diff --git a/app/src/main/res/values-de/strings-preferences.xml b/app/src/main/res/values-de/strings-preferences.xml index 0a1da222..dc8ca4c0 100644 --- a/app/src/main/res/values-de/strings-preferences.xml +++ b/app/src/main/res/values-de/strings-preferences.xml @@ -24,8 +24,16 @@ Persönliche Einstellungen + Öffne die Einstellungen deines Diaspora Accounts + Kontakte + Bearbeite deine Kontaktliste + Tags verwalten - Pod wechseln + Verwalte die Liste der Hashtags, denen du folgst + + Account wechseln + Lösche lokale Sitzungsdaten und wechsle zu einem anderen Pod/Account + Das wird alle Cookies und Session-Daten löschen. Willst du wirklich den Account wechseln? diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index e799105c..91e0537d 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -12,7 +12,6 @@ Bestätigung Möchtest du wirklich \nhttps://%1$s\nals deinen Diaspora Pod auswählen? Möchtest du die App verlassen? - Das wird alle Cookies und Session-Daten löschen. Willst du wirklich den Pod wechseln? Du musst der App Zugriff auf den Gerätespeicher gewähren, damit das Bildschirmfoto gespeichert werden kann. Danach solltest du die Anwendung komplett schließen oder das Telefon neu starten. diff --git a/app/src/main/res/values/strings-preferences.xml b/app/src/main/res/values/strings-preferences.xml index a393c8dd..fb6f6f43 100644 --- a/app/src/main/res/values/strings-preferences.xml +++ b/app/src/main/res/values/strings-preferences.xml @@ -27,13 +27,23 @@ Enable Proxy Proxy Diaspora\'s traffic to circumvent firewalls.\nMay require restart + Host + Port Personal settings + Open your diaspora account settings + Contacts + Manage your contact list + Manage Hashtags - Change pod + Add and delete the hashtags you are following + + Change Account + Erase local session data and switch to another Diaspora pod/account + This will erase all cookies and session data. Do you really want to change your account? \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a64ea880..93269cb9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -48,7 +48,6 @@ Confirmation Do you really want to use\nhttps://%1$s\nas your Diaspora Pod? Do you want to exit? - This will erase all cookies and session data. Do you really want to change pods? D* New message Notifications Conversations diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index c3a6ed60..881e0926 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -19,22 +19,26 @@ android:key="pref_key_category_pod_settings"> + android:key="pref_key_personal_settings" + android:summary="@string/pref_desc_personal_settings"> + android:key="pref_key_manage_tags" + android:summary="@string/pref_desc_manage_tags"> + android:key="pref_key_manage_contacts" + android:summary="@string/pref_desc_manage_contacts"> + android:title="@string/pref_title_change_account" + android:key="pref_key_change_account" + android:summary="@string/pref_desc_change_account">