Subscribe for exitDumbMode() to update notifications

Instead of scheduling runWhenSmart(), which does not work sometimes
This commit is contained in:
Andrey Breslav
2013-01-25 21:55:28 +04:00
parent f91d4c5497
commit 0187451c6f
@@ -77,7 +77,17 @@ public class KotlinLibrariesNotificationProvider extends EditorNotifications.Pro
connection.subscribe(ProjectTopics.PROJECT_ROOTS, new ModuleRootAdapter() {
@Override
public void rootsChanged(ModuleRootEvent event) {
DumbService.getInstance(myProject).runWhenSmart(updateNotifications);
updateNotifications();
}
});
connection.subscribe(DumbService.DUMB_MODE, new DumbService.DumbModeListener() {
@Override
public void enteredDumbMode() {}
@Override
public void exitDumbMode() {
updateNotifications();
}
});
}