Rename chatPojos peerName field to contactName
This commit is contained in:
parent
d6092388a5
commit
b8b171a4f5
|
@ -38,8 +38,8 @@ public class ChatListRecyclerViewAdapter
|
|||
@Override
|
||||
public void onBindViewHolder(@NonNull ChatHolder holder, int position) {
|
||||
Chat model = getModelAt(position);
|
||||
holder.nameView.setText(model.peerName != null ?
|
||||
model.peerName : model.jid.toString());
|
||||
holder.nameView.setText(model.contactName != null ?
|
||||
model.contactName : model.jid.toString());
|
||||
holder.avatarView.setColorFilter(ColorUtil.consistentColor(model.jid.toString()));
|
||||
|
||||
holder.itemView.setOnClickListener(view -> {
|
||||
|
|
|
@ -45,7 +45,7 @@ public class PlainMessageStore {
|
|||
org.mercury_im.messenger.persistence.pojo.Chat chatPojo = new org.mercury_im.messenger.persistence.pojo.Chat();
|
||||
chatPojo.jid = from;
|
||||
chatPojo.accountId = accountId;
|
||||
chatPojo.peerName = null;
|
||||
chatPojo.contactName = null;
|
||||
notificationManager.chatMessageReceived(chatPojo, null, message.getBody());
|
||||
|
||||
MessageModel messageModel = messageRepository.newMessageModel();
|
||||
|
|
|
@ -44,7 +44,7 @@ public interface ChatDao extends BaseDao<RoomChatModel> {
|
|||
|
||||
@Query("SELECT chats.pk_chat_id as chatId, " +
|
||||
"chats.fk_entity_id as entityId, " +
|
||||
"contacts.rostername as peerName, " +
|
||||
"contacts.rostername as contactName, " +
|
||||
"entities.fk_account_id as accountId, " +
|
||||
"jid, active " +
|
||||
"from chats " +
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.jxmpp.jid.EntityBareJid;
|
|||
public class Chat {
|
||||
public long chatId;
|
||||
public long entityId;
|
||||
public String peerName;
|
||||
public String contactName;
|
||||
public long accountId;
|
||||
public EntityBareJid jid;
|
||||
public boolean active;
|
||||
|
|
Loading…
Reference in New Issue