Fix a casting issue
This commit is contained in:
parent
268e4439d7
commit
b678ae295b
@ -15,6 +15,7 @@ import java.util.logging.Logger;
|
||||
import javafx.animation.RotateTransition;
|
||||
import javafx.application.Platform;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.collections.transformation.FilteredList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.Node;
|
||||
@ -133,7 +134,7 @@ public final class ChatScene implements Restorable {
|
||||
private static final int MAX_MESSAGE_LENGTH = 255;
|
||||
private static final int DEFAULT_ICON_SIZE = 16;
|
||||
|
||||
private FilteredList<? extends Chat> chats;
|
||||
private FilteredList<Chat> chats;
|
||||
|
||||
/**
|
||||
* Initializes the appearance of certain visual components.
|
||||
@ -552,7 +553,7 @@ public final class ChatScene implements Restorable {
|
||||
// Moving currentChat to the top
|
||||
Platform.runLater(() -> {
|
||||
chats.getSource().remove(currentChat);
|
||||
chats.getSource().add(0, currentChat);
|
||||
((ObservableList<Chat>) chats.getSource()).add(0, currentChat);
|
||||
chatList.getSelectionModel().select(0);
|
||||
localDB.getChats().remove(currentChat);
|
||||
localDB.getChats().add(0, currentChat);
|
||||
|
Reference in New Issue
Block a user