[platform] restoring update notifications for scheduled update checks

GitOrigin-RevId: 2a5853246220207a2901ff75b3c4cf4fae086d43
This commit is contained in:
Roman Shevchenko
2024-09-19 14:33:22 +02:00
committed by intellij-monorepo-bot
parent 91eda2eef8
commit 3ce202bd9f
2 changed files with 4 additions and 7 deletions

View File

@@ -16343,7 +16343,6 @@ f:com.intellij.openapi.updateSettings.impl.UpdateChecker
- sf:getPlatformUpdates():com.intellij.openapi.updateSettings.impl.PlatformUpdates
- sf:getPlatformUpdates(com.intellij.openapi.updateSettings.impl.UpdateSettings):com.intellij.openapi.updateSettings.impl.PlatformUpdates
- sf:getPluginUpdates():java.util.Collection
- f:getUpdates():com.intellij.openapi.util.ActionCallback
- sf:loadProductData(com.intellij.openapi.progress.ProgressIndicator):com.intellij.openapi.updateSettings.impl.Product
- sf:saveDisabledToUpdatePlugins():V
- sf:updateAndShowResult():com.intellij.openapi.util.ActionCallback

View File

@@ -71,10 +71,7 @@ private class UpdateCheckerHelper(private val coroutineScope: CoroutineScope) {
@OptIn(ExperimentalCoroutinesApi::class)
private val limitedDispatcher = Dispatchers.IO.limitedParallelism(1)
/**
* For scheduled update checks.
*/
fun updateAndShowResult(showResults: Boolean = false): ActionCallback {
fun updateAndShowResult(showResults: Boolean): ActionCallback {
val callback = ActionCallback()
coroutineScope.launch(limitedDispatcher) {
doUpdateAndShowResult(
@@ -128,10 +125,11 @@ object UpdateChecker {
*/
@JvmStatic
fun updateAndShowResult(): ActionCallback =
service<UpdateCheckerHelper>().updateAndShowResult()
service<UpdateCheckerHelper>().updateAndShowResult(showResults = true)
@ApiStatus.Internal
fun getUpdates(): ActionCallback =
service<UpdateCheckerHelper>().updateAndShowResult(false)
service<UpdateCheckerHelper>().updateAndShowResult(showResults = false)
/**
* For manual update checks (Help | Check for Updates, Settings | Updates | Check Now)