Skip to content

Commit

Permalink
fix(intellij): use EditorColorsListener instead of UISettingsListener. (
Browse files Browse the repository at this point in the history
  • Loading branch information
icycodes authored Oct 2, 2024
1 parent 4e19f21 commit d67ccc2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package com.tabbyml.intellijtabby.chat
import com.google.gson.Gson
import com.google.gson.annotations.SerializedName
import com.google.gson.reflect.TypeToken
import com.intellij.ide.ui.UISettingsListener
import com.intellij.openapi.application.ReadAction
import com.intellij.openapi.application.invokeLater
import com.intellij.openapi.command.WriteCommandAction
import com.intellij.openapi.components.service
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.editor.colors.EditorColors
import com.intellij.openapi.editor.colors.EditorColorsListener
import com.intellij.openapi.editor.colors.EditorColorsManager
import com.intellij.openapi.editor.colors.EditorFontType
import com.intellij.openapi.fileEditor.FileEditorManager
Expand Down Expand Up @@ -102,7 +102,8 @@ class ChatBrowser(private val project: Project) {
}
})

messageBusConnection.subscribe(UISettingsListener.TOPIC, UISettingsListener {
messageBusConnection.subscribe(EditorColorsManager.TOPIC, EditorColorsListener {
logger.debug("EditorColorsManager globalSchemeChange received, updating style.")
jsApplyStyle()
chatPanelUpdateTheme()
})
Expand Down

0 comments on commit d67ccc2

Please sign in to comment.