added search in contact list.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.to.telegramfinalproject.Models;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
public class ContactEntry {
|
||||
@@ -8,6 +9,9 @@ public class ContactEntry {
|
||||
private String profileName;
|
||||
private String imageUrl;
|
||||
private boolean isBlocked;
|
||||
private LocalDateTime lastSeenTime;
|
||||
private String contact_displayId;
|
||||
|
||||
|
||||
public ContactEntry(UUID contactId, String userId, String profileName, String imageUrl, boolean isBlocked) {
|
||||
this.contactId = contactId;
|
||||
@@ -17,6 +21,16 @@ public class ContactEntry {
|
||||
this.isBlocked = isBlocked;
|
||||
}
|
||||
|
||||
public ContactEntry(UUID contactId, String userId,String contact_displayId , String profileName, String imageUrl, boolean isBlocked, LocalDateTime lastSeenTime){
|
||||
this.contactId = contactId;
|
||||
this.userId = userId;
|
||||
this.contact_displayId = contact_displayId;
|
||||
this.profileName = profileName;
|
||||
this.imageUrl = imageUrl;
|
||||
this.isBlocked = isBlocked;
|
||||
this.lastSeenTime = lastSeenTime;
|
||||
}
|
||||
|
||||
public UUID getContactId() {
|
||||
return contactId;
|
||||
}
|
||||
@@ -37,8 +51,24 @@ public class ContactEntry {
|
||||
return isBlocked;
|
||||
}
|
||||
|
||||
public LocalDateTime getLastSeenTime() {
|
||||
return lastSeenTime;
|
||||
}
|
||||
|
||||
public void setLastSeenTime(LocalDateTime lastSeenTime) {
|
||||
this.lastSeenTime = lastSeenTime;
|
||||
}
|
||||
|
||||
public String getContact_displayId() {
|
||||
return contact_displayId;
|
||||
}
|
||||
|
||||
public void setContact_displayId(String contact_displayId) {
|
||||
this.contact_displayId = contact_displayId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return profileName + " (" + userId + ")" + (isBlocked ? " [Blocked]" : "");
|
||||
return profileName + " (@" + contact_displayId + ")" + (isBlocked ? " [Blocked]" : "") + " Last Seen:" + (lastSeenTime != null ? " " + lastSeenTime.toString() : "");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user