Commit b9e1f2f5 authored by Grigory Fedorov's avatar Grigory Fedorov

ContactTitleInflater: account avatar fixed.

parent 9b547e72
......@@ -20,8 +20,10 @@ import android.widget.ImageView;
import android.widget.TextView;
import com.xabber.android.R;
import com.xabber.android.data.extension.avatar.AvatarManager;
import com.xabber.android.data.extension.cs.ChatStateManager;
import com.xabber.android.data.roster.AbstractContact;
import com.xabber.xmpp.address.Jid;
import org.jivesoftware.smackx.chatstates.ChatState;
......@@ -33,7 +35,13 @@ public class ContactTitleInflater {
final ImageView avatarView = (ImageView) titleView.findViewById(R.id.avatar);
nameView.setText(abstractContact.getName());
// if it is account, not simple user contact
if (Jid.getBareAddress(abstractContact.getUser()).equals(Jid.getBareAddress(abstractContact.getAccount()))) {
avatarView.setImageDrawable(AvatarManager.getInstance().getAccountAvatar(abstractContact.getAccount()));
} else {
avatarView.setImageDrawable(abstractContact.getAvatar());
}
setStatus(context, titleView, abstractContact);
}
......
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