From aac524da7efb35f7bf7269b56457cf40d63d14d1 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 26 Oct 2019 19:29:57 +0200 Subject: clear bitmap cache after changing avatar settings --- src/main/java/de/pixart/messenger/ui/SettingsActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java/de') 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)); -- cgit v1.2.3