diff --git a/src/main/java/dev/nocalhost/plugin/intellij/ui/SyncStatusWidget.java b/src/main/java/dev/nocalhost/plugin/intellij/ui/SyncStatusWidget.java index 92f1ccca..2d0d8441 100644 --- a/src/main/java/dev/nocalhost/plugin/intellij/ui/SyncStatusWidget.java +++ b/src/main/java/dev/nocalhost/plugin/intellij/ui/SyncStatusWidget.java @@ -14,6 +14,7 @@ public class SyncStatusWidget implements StatusBarWidget { private final StatusBar statusBar; private final Project project; + private final SyncStatusPresentation syncStatusPresentation; private Thread updateThread = null; private boolean forceExit = false; @@ -21,6 +22,7 @@ public class SyncStatusWidget implements StatusBarWidget { public SyncStatusWidget(Project project) { this.statusBar = WindowManager.getInstance().getStatusBar(project); this.project = project; + syncStatusPresentation = new SyncStatusPresentation(project, statusBar, this); } @Override @@ -31,7 +33,7 @@ public SyncStatusWidget(Project project) { @Override public @Nullable WidgetPresentation getPresentation() { - return new SyncStatusPresentation(project, statusBar, this); + return syncStatusPresentation; } @Override