aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-31 15:18:55 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-31 15:18:55 +0200
commit88d1bd356c9408df6f12829dcd427b92af1e3969 (patch)
tree81947e4544896da4d590ac6309280b54f5e69c82
parent990f0f6d73b1c63dd61c824a6b73ba056e2de75c (diff)
get rid of 'use phones self contact picture option'
-rw-r--r--res/xml/preferences.xml5
-rw-r--r--src/eu/siacs/conversations/ui/adapter/MessageAdapter.java18
2 files changed, 5 insertions, 18 deletions
diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
index 40039cd5..b64a477d 100644
--- a/res/xml/preferences.xml
+++ b/res/xml/preferences.xml
@@ -63,11 +63,6 @@
<PreferenceCategory
android:title="@string/pref_ui_options">
<CheckBoxPreference
- android:key="show_phone_selfcontact_picture"
- android:title="@string/pref_use_phone_self_picture"
- android:summary="@string/pref_use_phone_self_picture_summary"
- android:defaultValue="true"/>
- <CheckBoxPreference
android:key="use_subject_in_muc"
android:title="@string/pref_conference_name"
android:summary="@string/pref_conference_name_summary"
diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index 8489de2e..c184e0e0 100644
--- a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -13,10 +13,8 @@ import eu.siacs.conversations.utils.UIHelper;
import eu.siacs.conversations.xmpp.jingle.JingleConnection;
import android.content.Context;
import android.content.Intent;
-import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.Typeface;
-import android.preference.PreferenceManager;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.ViewGroup;
@@ -37,7 +35,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
private ConversationActivity activity;
- private Bitmap selfBitmap2;
+ private Bitmap accountBitmap;
private BitmapCache mBitmapCache = new BitmapCache();
private DisplayMetrics metrics;
@@ -51,20 +49,14 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
private Bitmap getSelfBitmap() {
- if (this.selfBitmap2 == null) {
+ if (this.accountBitmap == null) {
if (getCount() > 0) {
- SharedPreferences preferences = PreferenceManager
- .getDefaultSharedPreferences(getContext());
- boolean showPhoneSelfContactPicture = preferences.getBoolean(
- "show_phone_selfcontact_picture", true);
-
- this.selfBitmap2 = UIHelper.getSelfContactPicture(getItem(0)
- .getConversation().getAccount(), 48,
- showPhoneSelfContactPicture, getContext());
+ this.accountBitmap = getItem(0)
+ .getConversation().getAccount().getImage(getContext(), 48);
}
}
- return this.selfBitmap2;
+ return this.accountBitmap;
}
public void setOnContactPictureClicked(OnContactPictureClicked listener) {