Skip to content

Commit

Permalink
Merge branch 'bug/UIUpdateConversationItem'
Browse files Browse the repository at this point in the history
  • Loading branch information
miniwolf committed Apr 2, 2017
2 parents 2979583 + adaec7a commit 4cb0673
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions fagiClient/src/com/fagi/controller/MainScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,7 @@ public void setConversation(Conversation conversation) {

public void addConversation(Conversation conversation) {
conversations.add(conversation);
Pane pane = createMessageItem(conversation);
Platform.runLater(() -> conversationContentController.addToContentList(pane));
setupConversationList();
}

public List<MessageItemController> getMessageItems() {
Expand Down Expand Up @@ -375,8 +374,7 @@ private void setupConversationList() {

public Pane createMessageItem(Conversation conversation) {
MessageItemController messageItemController =
new MessageItemController(usernameString,
conversation);
new MessageItemController(usernameString, conversation);
messageItemController.getActionable()
.assign(new OpenConversationFromID(this, conversation.getId()));
messageItems.add(messageItemController);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public ReceivedInvitationController(FriendRequest request, MainScreen mainScreen

new LoadFXML(this, "/com/fagi/view/conversation/ReceivedInvitation.fxml").execute();

String username = request.getFriendUsername();
String username = request.getMessage().getMessageInfo().getSender();
Image smallImage = new Image(
"/com/fagi/style/material-icons/" + username.toCharArray()[0] + ".png", 32, 32,
true, true);
Expand Down

0 comments on commit 4cb0673

Please sign in to comment.