Fix bugs in add contact to chat

This commit is contained in:
2025-09-08 00:50:48 +03:30
parent 1ce577e39e
commit 6fc2b2e2ed
3 changed files with 122 additions and 25 deletions
@@ -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";
}
}