diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index ecd90803..cc2b952f 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -60,14 +60,6 @@ android:summary="@string/pref_notification_grace_period_summary" android:defaultValue="true"/> - - - listAdapter; private OnConversationUpdate onConvChanged = new OnConversationUpdate() { @@ -182,8 +178,7 @@ public class ConversationActivity extends XmppActivity { if (ab != null) { ab.setDisplayHomeAsUpEnabled(true); ab.setHomeButtonEnabled(true); - ab.setTitle(getSelectedConversation().getName( - useSubject)); + ab.setTitle(getSelectedConversation().getName()); } invalidateOptionsMenu(); if (!getSelectedConversation().isRead()) { @@ -562,10 +557,6 @@ public class ConversationActivity extends XmppActivity { @Override public void onStart() { super.onStart(); - SharedPreferences preferences = PreferenceManager - .getDefaultSharedPreferences(this); - this.useSubject = preferences.getBoolean("use_subject_in_muc", true); - this.showLastseen = preferences.getBoolean("show_last_seen", false); if (this.xmppConnectionServiceBound) { this.onBackendConnected(); } @@ -741,15 +732,6 @@ public class ConversationActivity extends XmppActivity { listView.invalidateViews(); } - public boolean showLastseen() { - if (getSelectedConversation() == null) { - return false; - } else { - return this.showLastseen - && getSelectedConversation().getMode() == Conversation.MODE_SINGLE; - } - } - public void runIntent(PendingIntent pi, int requestCode) { try { this.startIntentSenderForResult(pi.getIntentSender(), requestCode, diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index 77049e56..b0fd4a03 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -26,10 +26,8 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentSender; -import android.content.SharedPreferences; import android.content.IntentSender.SendIntentException; import android.os.Bundle; -import android.preference.PreferenceManager; import android.text.Editable; import android.text.Selection; import android.view.Gravity; @@ -67,7 +65,6 @@ public class ConversationFragment extends Fragment { private TextView snackbarMessage; private TextView snackbarAction; - private boolean useSubject = true; private boolean messagesLoaded = false; private IntentSender askForPassphraseIntent = null; @@ -301,9 +298,6 @@ public class ConversationFragment extends Fragment { public void onStart() { super.onStart(); this.activity = (ConversationActivity) getActivity(); - SharedPreferences preferences = PreferenceManager - .getDefaultSharedPreferences(activity); - this.useSubject = preferences.getBoolean("use_subject_in_muc", true); if (activity.xmppConnectionServiceBound) { this.onBackendConnected(); } @@ -344,7 +338,7 @@ public class ConversationFragment extends Fragment { activity.getActionBar().setDisplayHomeAsUpEnabled(true); activity.getActionBar().setHomeButtonEnabled(true); activity.getActionBar().setTitle( - conversation.getName(useSubject)); + conversation.getName()); activity.invalidateOptionsMenu(); } } diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java index 174bab3a..78482658 100644 --- a/src/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -384,7 +384,7 @@ public abstract class XmppActivity extends Activity { xmppConnectionService.invite(conversation, contactJid); } Log.d(Config.LOGTAG, "inviting " + contactJid + " to " - + conversation.getName(true)); + + conversation.getName()); } } diff --git a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java index 8f7eef8c..c3ff5b22 100644 --- a/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java +++ b/src/eu/siacs/conversations/ui/adapter/ConversationAdapter.java @@ -51,7 +51,7 @@ public class ConversationAdapter extends ArrayAdapter { } TextView convName = (TextView) view .findViewById(R.id.conversation_name); - convName.setText(conv.getName(true)); + convName.setText(conv.getName()); TextView convLastMsg = (TextView) view .findViewById(R.id.conversation_lastmsg); ImageView imagePreview = (ImageView) view diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 553584cd..08388ed8 100644 --- a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -377,7 +377,7 @@ public class MessageAdapter extends ArrayAdapter { @Override public void onClick(View v) { String name = item.getConversation() - .getName(true); + .getName(); String read = getContext() .getString( R.string.contact_has_read_up_to_this_point, diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java index 49645475..41724596 100644 --- a/src/eu/siacs/conversations/utils/UIHelper.java +++ b/src/eu/siacs/conversations/utils/UIHelper.java @@ -215,7 +215,7 @@ public class UIHelper { List members = conversation.getMucOptions().getUsers(); if (members.size() == 0) { return getUnknownContactPicture( - new String[] { conversation.getName(false) }, size, + new String[] { conversation.getName() }, size, bgColor, fgColor); } ArrayList names = new ArrayList(); @@ -332,7 +332,6 @@ public class UIHelper { SharedPreferences preferences = PreferenceManager .getDefaultSharedPreferences(context); - boolean useSubject = preferences.getBoolean("use_subject_in_muc", true); boolean showNofifications = preferences.getBoolean("show_notification", true); boolean vibrate = preferences.getBoolean("vibrate_on_notification", @@ -381,7 +380,7 @@ public class UIHelper { Conversation conversation = unread.get(0); targetUuid = conversation.getUuid(); mBuilder.setLargeIcon(conversation.getImage(context, 64)); - mBuilder.setContentTitle(conversation.getName(useSubject)); + mBuilder.setContentTitle(conversation.getName()); if (notify) { mBuilder.setTicker(conversation.getLatestMessage() .getReadableBody(context)); @@ -413,12 +412,12 @@ public class UIHelper { for (int i = 0; i < unread.size(); ++i) { targetUuid = unread.get(i).getUuid(); if (i < unread.size() - 1) { - names.append(unread.get(i).getName(useSubject) + ", "); + names.append(unread.get(i).getName() + ", "); } else { - names.append(unread.get(i).getName(useSubject)); + names.append(unread.get(i).getName()); } style.addLine(Html.fromHtml("" - + unread.get(i).getName(useSubject) + + unread.get(i).getName() + " " + unread.get(i).getLatestMessage() .getReadableBody(context)));