mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 04:12:08 +01:00
Added some more preference summaries
This commit is contained in:
parent
28bc94da44
commit
f5e2aef90f
7 changed files with 34 additions and 19 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
})
|
||||
|
|
|
@ -24,8 +24,16 @@
|
|||
|
||||
<!-- Diaspora Settings -->
|
||||
<string name="pref_title_personal_settings">Persönliche Einstellungen</string>
|
||||
<string name="pref_desc_personal_settings">Öffne die Einstellungen deines Diaspora Accounts</string>
|
||||
|
||||
<string name="pref_title_manage_contacts">Kontakte</string>
|
||||
<string name="pref_desc_manage_contacts">Bearbeite deine Kontaktliste</string>
|
||||
|
||||
<string name="pref_title_manage_tags">Tags verwalten</string>
|
||||
<string name="pref_title_change_pod">Pod wechseln</string>
|
||||
<string name="pref_desc_manage_tags">Verwalte die Liste der Hashtags, denen du folgst</string>
|
||||
|
||||
<string name="pref_title_change_account">Account wechseln</string>
|
||||
<string name="pref_desc_change_account">Lösche lokale Sitzungsdaten und wechsle zu einem anderen Pod/Account</string>
|
||||
<string name="pref_warning_change_account">Das wird alle Cookies und Session-Daten löschen. Willst du wirklich den Account wechseln?</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<string name="confirmation">Bestätigung</string>
|
||||
<string name="confirm_pod">Möchtest du wirklich \nhttps://%1$s\nals deinen Diaspora Pod auswählen?</string>
|
||||
<string name="confirm_exit">Möchtest du die App verlassen?</string>
|
||||
<string name="change_pod_warning">Das wird alle Cookies und Session-Daten löschen. Willst du wirklich den Pod wechseln?</string>
|
||||
|
||||
<string name="permissions_screenshot">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.
|
||||
|
|
|
@ -27,13 +27,23 @@
|
|||
<!-- Proxy -->
|
||||
<string name="pref_title_proxy_enabled">Enable Proxy</string>
|
||||
<string name="pref_desc_proxy_enabled">Proxy Diaspora\'s traffic to circumvent firewalls.\nMay require restart</string>
|
||||
|
||||
<string name="pref_title_proxy_host" translatable="false">Host</string>
|
||||
|
||||
<string name="pref_title_proxy_port" translatable="false">Port</string>
|
||||
|
||||
<!-- Diaspora Settings -->
|
||||
<string name="pref_title_personal_settings">Personal settings</string>
|
||||
<string name="pref_desc_personal_settings">Open your diaspora account settings</string>
|
||||
|
||||
<string name="pref_title_manage_contacts">Contacts</string>
|
||||
<string name="pref_desc_manage_contacts">Manage your contact list</string>
|
||||
|
||||
<string name="pref_title_manage_tags">Manage Hashtags</string>
|
||||
<string name="pref_title_change_pod">Change pod</string>
|
||||
<string name="pref_desc_manage_tags">Add and delete the hashtags you are following</string>
|
||||
|
||||
<string name="pref_title_change_account">Change Account</string>
|
||||
<string name="pref_desc_change_account">Erase local session data and switch to another Diaspora pod/account</string>
|
||||
<string name="pref_warning_change_account">This will erase all cookies and session data. Do you really want to change your account?</string>
|
||||
|
||||
</resources>
|
|
@ -48,7 +48,6 @@
|
|||
<string name="confirmation">Confirmation</string>
|
||||
<string name="confirm_pod">Do you really want to use\nhttps://%1$s\nas your Diaspora Pod?</string>
|
||||
<string name="confirm_exit">Do you want to exit?</string>
|
||||
<string name="change_pod_warning">This will erase all cookies and session data. Do you really want to change pods?</string>
|
||||
<string name="new_post">D* New message</string>
|
||||
<string name="notifications">Notifications</string>
|
||||
<string name="messages">Conversations</string>
|
||||
|
|
|
@ -19,22 +19,26 @@
|
|||
android:key="pref_key_category_pod_settings">
|
||||
<Preference
|
||||
android:title="@string/pref_title_personal_settings"
|
||||
android:key="pref_key_personal_settings">
|
||||
android:key="pref_key_personal_settings"
|
||||
android:summary="@string/pref_desc_personal_settings">
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:title="@string/pref_title_manage_tags"
|
||||
android:key="pref_key_manage_tags">
|
||||
android:key="pref_key_manage_tags"
|
||||
android:summary="@string/pref_desc_manage_tags">
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:title="@string/pref_title_manage_contacts"
|
||||
android:key="pref_key_manage_contacts">
|
||||
android:key="pref_key_manage_contacts"
|
||||
android:summary="@string/pref_desc_manage_contacts">
|
||||
</Preference>
|
||||
|
||||
<Preference
|
||||
android:title="@string/pref_title_change_pod"
|
||||
android:key="pref_key_change_pod">
|
||||
android:title="@string/pref_title_change_account"
|
||||
android:key="pref_key_change_account"
|
||||
android:summary="@string/pref_desc_change_account">
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
|
||||
|
|
Loading…
Reference in a new issue