fix duplicate plugin update notifications: don't queue the next plugin update while the network request from the previous update is still running

This commit is contained in:
Dmitry Jemerov
2015-11-09 14:28:53 +01:00
parent a5771c6c1c
commit 1d01565262
@@ -71,8 +71,6 @@ class KotlinPluginUpdater(val propertiesComponent: PropertiesComponent) : Dispos
private fun updateCheck() {
try {
checkQueued = false
var (mainRepoUpdateSuccess, latestVersionInRepository) = getPluginVersionFromMainRepository()
var descriptorToInstall: IdeaPluginDescriptor? = null
var hostToInstallFrom: String? = null
@@ -94,6 +92,8 @@ class KotlinPluginUpdater(val propertiesComponent: PropertiesComponent) : Dispos
}
}
checkQueued = false
if (mainRepoUpdateSuccess || latestVersionInRepository != null) {
recordSuccessfulUpdateCheck()
if (latestVersionInRepository != null && VersionComparatorUtil.compare(latestVersionInRepository, KotlinPluginUtil.getPluginVersion()) > 0) {