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 {
ChatState chatState = ChatStateManager.getInstance().getChatState(
abstractContact.getAccount(), abstractContact.getUser());
final CharSequence statusText;
CharSequence statusText;
if (chatState == ChatState.composing) {
statusText = activity.getString(R.string.chat_state_composing);
} else if (chatState == ChatState.paused) {
statusText = activity.getString(R.string.chat_state_paused);
} else {
if (isContactOffline(statusLevel)) {
statusText = activity.getString(R.string.unavailable);
} else {
statusText = Emoticons.getSmiledText(activity, abstractContact.getStatusText());
statusText = Emoticons.getSmiledText(activity, abstractContact.getStatusText()).toString().trim();
if (statusText.toString().isEmpty()) {
statusText = activity.getString(abstractContact.getStatusMode().getStringID());
}
}
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