Rename chatPojos peerName field to contactName

This commit is contained in:
Paul Schaub 2019-09-30 02:34:47 +02:00
parent d6092388a5
commit b8b171a4f5
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
4 changed files with 5 additions and 5 deletions

View File

@ -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 -> {

View File

@ -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();

View File

@ -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 " +

View File

@ -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;