diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-10-21 23:49:06 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2015-10-21 23:49:06 +0200 |
commit | 85a25984f4bf4dfa2432fbc2c92f8117cf927fcf (patch) | |
tree | b13aa11f4ce0be81e2b03cf74a00a33e03b2399f /src/main/java/de/thedevstack/conversationsplus/ui/SettingsActivity.java | |
parent | 1d9b4e959d70c2f008574f9a75c7eeb4b47c63ef (diff) |
Access to preferences moved to global utility class ConversationsPlusPreferences. Unused imports removed. Unnecessary references to XmppConnectionService removed. Bug in call order in StartConversationActivity for the setting hide_offline fixed.
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/SettingsActivity.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/ui/SettingsActivity.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/SettingsActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/SettingsActivity.java index 46a68f65..c364ff00 100644 --- a/src/main/java/de/thedevstack/conversationsplus/ui/SettingsActivity.java +++ b/src/main/java/de/thedevstack/conversationsplus/ui/SettingsActivity.java @@ -6,6 +6,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.Locale; +import de.thedevstack.conversationsplus.ConversationsPlusPreferences; import de.tzur.conversations.Settings; import de.duenndns.ssl.MemorizingTrustManager; @@ -15,7 +16,6 @@ import de.thedevstack.conversationsplus.xmpp.XmppConnection; import github.ankushsachdeva.emojicon.EmojiconHandler; import android.app.AlertDialog; -import android.app.Fragment; import android.app.FragmentManager; import android.content.DialogInterface; import android.content.SharedPreferences; @@ -135,11 +135,10 @@ public class SettingsActivity extends XmppActivity implements public void onSharedPreferenceChanged(SharedPreferences preferences, String name) { // need to synchronize the settings class first - Settings.synchronizeSettingsClassWithPreferences(getPreferences(), name); + Settings.synchronizeSettingsClassWithPreferences(preferences, name); switch (name) { case "resource": - String resource = preferences.getString("resource", "mobile") - .toLowerCase(Locale.US); + String resource = ConversationsPlusPreferences.resource().toLowerCase(Locale.US); if (xmppConnectionServiceBound) { for (Account account : xmppConnectionService.getAccounts()) { account.setResource(resource); |