only show router disconnection warning when using external router

dbus-notify
Zlatin Balevsky 2022-04-11 15:55:14 +01:00
parent 42aa9b9acb
commit 00886c57ab
No known key found for this signature in database
GPG Key ID: A72832072D525E41
2 changed files with 3 additions and 1 deletions

View File

@ -162,7 +162,7 @@ public class Core {
private final TrackerResponder trackerResponder
final AutoUpdater autoUpdater
private final Router router
final Router router
final AtomicBoolean shutdown = new AtomicBoolean()

View File

@ -806,6 +806,8 @@ class MainFrameModel {
void onRouterDisconnectedEvent(RouterDisconnectedEvent e) {
if (core.getShutdown().get())
return
if (core.router != null)
return
runInsideUIAsync {
JOptionPane.showMessageDialog(null, trans("LOST_ROUTER_BODY"),
trans("LOST_ROUTER_TITLE"), JOptionPane.WARNING_MESSAGE)