Fixed UI update after message status changes
This commit is contained in:
parent
9e024ede09
commit
19fafc4c38
@ -8,6 +8,7 @@ import envoy.data.Message;
|
|||||||
* Created: <strong>4 Dec 2019</strong><br>
|
* Created: <strong>4 Dec 2019</strong><br>
|
||||||
*
|
*
|
||||||
* @author Kai S. K. Engelbart
|
* @author Kai S. K. Engelbart
|
||||||
|
* @since Envoy v0.2-alpha
|
||||||
*/
|
*/
|
||||||
public class MessageCreationEvent extends MessageEvent {
|
public class MessageCreationEvent extends MessageEvent {
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import envoy.event.Event;
|
|||||||
* Created: <strong>4 Dec 2019</strong><br>
|
* Created: <strong>4 Dec 2019</strong><br>
|
||||||
*
|
*
|
||||||
* @author Kai S. K. Engelbart
|
* @author Kai S. K. Engelbart
|
||||||
|
* @since Envoy v0.2-alpha
|
||||||
*/
|
*/
|
||||||
public class MessageEvent implements Event<Message> {
|
public class MessageEvent implements Event<Message> {
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import envoy.data.Message;
|
|||||||
* Created: <strong>4 Dec 2019</strong><br>
|
* Created: <strong>4 Dec 2019</strong><br>
|
||||||
*
|
*
|
||||||
* @author Kai S. K. Engelbart
|
* @author Kai S. K. Engelbart
|
||||||
|
* @since Envoy v0.2-alpha
|
||||||
*/
|
*/
|
||||||
public class MessageModificationEvent extends MessageEvent {
|
public class MessageModificationEvent extends MessageEvent {
|
||||||
|
|
||||||
|
@ -190,6 +190,7 @@ public class ChatWindow extends JFrame {
|
|||||||
messageList.setModel(currentChat.getModel());
|
messageList.setModel(currentChat.getModel());
|
||||||
scrollPane.setChatOpened(true);
|
scrollPane.setChatOpened(true);
|
||||||
|
|
||||||
|
messageList.synchronizeModel();
|
||||||
revalidate();
|
revalidate();
|
||||||
repaint();
|
repaint();
|
||||||
}
|
}
|
||||||
@ -250,8 +251,11 @@ public class ChatWindow extends JFrame {
|
|||||||
if (c == currentChat) {
|
if (c == currentChat) {
|
||||||
messageList.setModel(currentChat.getModel());
|
messageList.setModel(currentChat.getModel());
|
||||||
scrollPane.setChatOpened(true);
|
scrollPane.setChatOpened(true);
|
||||||
|
} else messageList.synchronizeModel();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
revalidate();
|
||||||
|
repaint();
|
||||||
});
|
});
|
||||||
|
|
||||||
revalidate();
|
revalidate();
|
||||||
|
Reference in New Issue
Block a user