mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
PY-82344 Track update ready restart notifications in PyCharm unified promotion
GitOrigin-RevId: 83d5f1b69ba960a5aef19206d0bc262f31b25a2e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
742c256b45
commit
7578c556a6
+6
@@ -112,4 +112,10 @@
|
||||
<statistics.counterUsagesCollector
|
||||
implementationClass="com.intellij.pycharm.community.ide.impl.promotion.communityToUnified.statistics.PyCommunityUnifiedPromoFusCollector"/>
|
||||
</extensions>
|
||||
|
||||
<applicationListeners>
|
||||
<listener
|
||||
class="com.intellij.pycharm.community.ide.impl.promotion.communityToUnified.statistics.PyCommunityUpdateReadyNotificationListener"
|
||||
topic="com.intellij.notification.Notifications"/>
|
||||
</applicationListeners>
|
||||
</idea-plugin>
|
||||
|
||||
+3
@@ -39,4 +39,7 @@ internal object PyCommunityUnifiedPromoFusCollector : CounterUsagesCollector() {
|
||||
// Update dialog
|
||||
internal val UpdateDialogShown = GROUP.registerEvent("update.dialog.shown")
|
||||
internal val UpdateDialogClosed = GROUP.registerEvent("update.dialog.closed", UpdateDialogCloseReasonField, DurationMsField)
|
||||
|
||||
// Update ready restart notification (balloon)
|
||||
internal val UpdateReadyRestartNotificationShown = GROUP.registerEvent("update.ready.restart.notification.shown")
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.pycharm.community.ide.impl.promotion.communityToUnified.statistics
|
||||
|
||||
import com.intellij.notification.Notification
|
||||
import com.intellij.notification.Notifications
|
||||
import com.intellij.openapi.updateSettings.impl.UpdateChecker
|
||||
import com.intellij.util.PlatformUtils
|
||||
|
||||
internal class PyCommunityUpdateReadyNotificationListener : Notifications {
|
||||
override fun notify(notification: Notification) {
|
||||
if (!PlatformUtils.isPyCharmCommunity()) return
|
||||
val targetGroupId = UpdateChecker.getNotificationGroupForIdeUpdateResults().displayId
|
||||
val restartDisplayId = "ide.update.suggest.restart"
|
||||
if (notification.groupId == targetGroupId && notification.displayId == restartDisplayId) {
|
||||
PyCommunityUnifiedPromoFusCollector.UpdateReadyRestartNotificationShown.log()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user