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
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Platform.runLater(() -> notifyHistoryLoaded());
|
Platform.runLater(() -> notifyHistoryLoaded());
|
||||||
|
t.cancel();
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,6 +86,7 @@ public class MainController implements Initializable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Platform.runLater(() -> CurrentUser.getInstance().setState(CurrentUser.State.VALID));
|
Platform.runLater(() -> CurrentUser.getInstance().setState(CurrentUser.State.VALID));
|
||||||
|
t.cancel();
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class EditUsernameDialogController implements Initializable {
|
||||||
public void run() {
|
public void run() {
|
||||||
// onError();
|
// onError();
|
||||||
onSuccess();
|
onSuccess();
|
||||||
|
t.cancel();
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue