Commit 2b1a2016 authored by Grigory Fedorov's avatar Grigory Fedorov

Contact title bar: contact status filled with standard text if empty.

Custom status trimmed.
parent 75da588e
...@@ -78,16 +78,15 @@ public class ContactTitleInflater { ...@@ -78,16 +78,15 @@ public class ContactTitleInflater {
ChatState chatState = ChatStateManager.getInstance().getChatState( ChatState chatState = ChatStateManager.getInstance().getChatState(
abstractContact.getAccount(), abstractContact.getUser()); abstractContact.getAccount(), abstractContact.getUser());
final CharSequence statusText; CharSequence statusText;
if (chatState == ChatState.composing) { if (chatState == ChatState.composing) {
statusText = activity.getString(R.string.chat_state_composing); statusText = activity.getString(R.string.chat_state_composing);
} else if (chatState == ChatState.paused) { } else if (chatState == ChatState.paused) {
statusText = activity.getString(R.string.chat_state_paused); statusText = activity.getString(R.string.chat_state_paused);
} else { } else {
if (isContactOffline(statusLevel)) { statusText = Emoticons.getSmiledText(activity, abstractContact.getStatusText()).toString().trim();
statusText = activity.getString(R.string.unavailable); if (statusText.toString().isEmpty()) {
} else { statusText = activity.getString(abstractContact.getStatusMode().getStringID());
statusText = Emoticons.getSmiledText(activity, abstractContact.getStatusText());
} }
} }
statusTextView.setText(statusText); statusTextView.setText(statusText);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment