aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2019-10-26 19:29:57 +0200
committerChristian Schneppe <christian.schneppe@pix-art.de>2019-10-26 19:29:57 +0200
commitaac524da7efb35f7bf7269b56457cf40d63d14d1 (patch)
tree2a46ee0e527a96ee1de386b26a0397ee53d1016a /src
parent1076c25767f4ba2e0b3728980ad77dbc73d9bc65 (diff)
clear bitmap cache after changing avatar settings
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/ui/SettingsActivity.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java
index 93b95c9c1..e57030a61 100644
--- a/src/main/java/de/pixart/messenger/ui/SettingsActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/SettingsActivity.java
@@ -269,6 +269,14 @@ public class SettingsActivity extends XmppActivity implements
});
}
+ final Preference prefereXmppAvatarPreference = mSettingsFragment.findPreference(PREFER_XMPP_AVATAR);
+ if (prefereXmppAvatarPreference != null) {
+ prefereXmppAvatarPreference.setOnPreferenceClickListener(preference -> {
+ new Thread(() -> xmppConnectionService.getBitmapCache().evictAll()).start();
+ return true;
+ });
+ }
+
final Preference showIntroAgainPreference = mSettingsFragment.findPreference("show_intro");
if (showIntroAgainPreference != null) {
showIntroAgainPreference.setSummary(getString(R.string.pref_show_intro_summary));