diff --git a/platform/feedback/src/com/intellij/platform/feedback/impl/IdleFeedbackResolver.kt b/platform/feedback/src/com/intellij/platform/feedback/impl/IdleFeedbackResolver.kt index c4ccf02a3cbd..5354873a4631 100644 --- a/platform/feedback/src/com/intellij/platform/feedback/impl/IdleFeedbackResolver.kt +++ b/platform/feedback/src/com/intellij/platform/feedback/impl/IdleFeedbackResolver.kt @@ -2,13 +2,16 @@ package com.intellij.platform.feedback.impl import com.intellij.internal.statistic.utils.getPluginInfoByDescriptor +import com.intellij.notification.NotificationsManager import com.intellij.openapi.application.EDT import com.intellij.openapi.components.Service import com.intellij.openapi.components.service +import com.intellij.openapi.diagnostic.thisLogger import com.intellij.openapi.extensions.ExtensionPointName import com.intellij.openapi.project.Project import com.intellij.openapi.util.registry.Registry import com.intellij.platform.feedback.FeedbackSurvey +import com.intellij.platform.feedback.impl.notification.RequestFeedbackNotification import com.intellij.platform.feedback.impl.state.DontShowAgainFeedbackService import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers @@ -40,6 +43,13 @@ class IdleFeedbackResolver(private val cs: CoroutineScope) { return } + val feedbackNotifications = NotificationsManager.getNotificationsManager() + .getNotificationsOfType(RequestFeedbackNotification::class.java, project) + if (feedbackNotifications.isNotEmpty()) { + thisLogger().debug("There is already another request feedback notification shown") + return + } + cs.launch { val suitableFeedbackTypes = IdleFeedbackTypes.entries.filter { it.isSuitable() } val suitableIdleFeedbackSurveys = getJbIdleFeedbackSurveyExtensionList().filter { it.isSuitableToShow(project) }