mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Possible fix for Issue #204: The [Done] button does not appear some times
This commit is contained in:
parent
2f7fbca49b
commit
9d5e1dee69
1 changed files with 11 additions and 1 deletions
|
|
@ -70,6 +70,7 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
|||
private FeedbackMode mode;
|
||||
private MageDialog connectedDialog;
|
||||
private ChatPanel connectedChatPanel;
|
||||
private int lastMessageId;
|
||||
|
||||
private static final ScheduledExecutorService worker = Executors.newSingleThreadScheduledExecutor();
|
||||
|
||||
|
|
@ -84,8 +85,17 @@ public class FeedbackPanel extends javax.swing.JPanel {
|
|||
session = MageFrame.getSession();
|
||||
}
|
||||
|
||||
public void getFeedback(FeedbackMode mode, String message, boolean special, Map<String, Serializable> options) {
|
||||
public void getFeedback(FeedbackMode mode, String message, boolean special, Map<String, Serializable> options, int messageId) {
|
||||
logger.info("text: " + message);
|
||||
|
||||
synchronized (this) {
|
||||
if (messageId < this.lastMessageId) {
|
||||
logger.warn("ignoring message from later source: " + messageId + ", text=" + message);
|
||||
return;
|
||||
}
|
||||
this.lastMessageId = messageId;
|
||||
}
|
||||
|
||||
this.lblMessage.setText(message);
|
||||
this.helper.setMessage(message);
|
||||
this.selected = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue