Fix bugs in add contact to chat
This commit is contained in:
@@ -7,6 +7,7 @@ import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.shape.Circle;
|
||||
import org.to.telegramfinalproject.Client.AvatarLocalResolver;
|
||||
import org.to.telegramfinalproject.Models.ChatEntry;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -141,4 +142,10 @@ public class ChatItemController {
|
||||
}
|
||||
}
|
||||
|
||||
private String safeTitle(ChatEntry e) {
|
||||
if (e.getName() != null && !e.getName().isBlank()) return e.getName();
|
||||
if (e.getDisplayId() != null && !e.getDisplayId().isBlank()) return e.getDisplayId();
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user