diff --git a/platform/whatsNew/src/com/intellij/platform/whatsNew/WhatsNewAction.kt b/platform/whatsNew/src/com/intellij/platform/whatsNew/WhatsNewAction.kt index 1caf4d932053..05a3c7250d72 100644 --- a/platform/whatsNew/src/com/intellij/platform/whatsNew/WhatsNewAction.kt +++ b/platform/whatsNew/src/com/intellij/platform/whatsNew/WhatsNewAction.kt @@ -23,19 +23,12 @@ import org.jetbrains.concurrency.await internal class WhatsNewAction : AnAction(), com.intellij.openapi.project.DumbAware { companion object { - private val LOG = logger() internal const val PLACE = "WhatsNew" - private const val REACTIONS_STATE = "whatsnew.reactions.state" - private val reactionChecker = FUSReactionChecker(REACTIONS_STATE) - - fun refresh() { - reactionChecker.clearLikenessState() - if (LOG.isTraceEnabled) { - LOG.trace("EapWhatsNew reaction refresh") - } - } } + private val REACTIONS_STATE = "whatsnew.reactions.state" + private val reactionChecker = FUSReactionChecker(REACTIONS_STATE) + private val hasWhatsNewContent by lazy { appScope.async { WhatsNewContent.hasWhatsNewContent() @@ -89,3 +82,5 @@ private fun Project.getScope() = this.service().scope private class AppScopeProvider(val scope: CoroutineScope) private val appScope: CoroutineScope get() = service().scope + +private val LOG = logger() diff --git a/platform/whatsNew/src/com/intellij/platform/whatsNew/WhatsNewInVisionContentProvider.kt b/platform/whatsNew/src/com/intellij/platform/whatsNew/WhatsNewInVisionContentProvider.kt index 61b1c387f16a..851bc8586ba3 100644 --- a/platform/whatsNew/src/com/intellij/platform/whatsNew/WhatsNewInVisionContentProvider.kt +++ b/platform/whatsNew/src/com/intellij/platform/whatsNew/WhatsNewInVisionContentProvider.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. +// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. @file:OptIn(ExperimentalSerializationApi::class) package com.intellij.platform.whatsNew @@ -100,7 +100,7 @@ class ResourceContentSource(private val classLoader: ClassLoader, private val re override suspend fun openStream(): InputStream? = withContext(Dispatchers.IO) { classLoader.getResourceAsStream(resourceName) } - override suspend fun checkAvailability() = withContext(Dispatchers.IO) { + override suspend fun checkAvailability(): Boolean = withContext(Dispatchers.IO) { classLoader.getResource(resourceName) != null } } \ No newline at end of file