fix: terminate timer tasks when ran
This commit is contained in:
parent
8d45d4c7e2
commit
f5848e1ab3
3 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,7 @@ public class ChatHistory {
|
|||
@Override
|
||||
public void run() {
|
||||
Platform.runLater(() -> notifyHistoryLoaded());
|
||||
t.cancel();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ public class MainController implements Initializable {
|
|||
@Override
|
||||
public void run() {
|
||||
Platform.runLater(() -> CurrentUser.getInstance().setState(CurrentUser.State.VALID));
|
||||
t.cancel();
|
||||
}
|
||||
}, 3000);
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ public class EditUsernameDialogController implements Initializable {
|
|||
public void run() {
|
||||
// onError();
|
||||
onSuccess();
|
||||
t.cancel();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue