From 65e9369102a4549991bed7493fab0b75dade98cb Mon Sep 17 00:00:00 2001 From: Zhiming Ma Date: Mon, 25 Nov 2024 00:10:29 +0800 Subject: [PATCH] fix(intellij): fix changing trigger mode does not take effect immediately. (#3460) --- .../intellijtabby/completion/InlineCompletionService.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/completion/InlineCompletionService.kt b/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/completion/InlineCompletionService.kt index 99ee5ef8f9a9..1f53d21e3ee7 100644 --- a/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/completion/InlineCompletionService.kt +++ b/clients/intellij/src/main/kotlin/com/tabbyml/intellijtabby/completion/InlineCompletionService.kt @@ -133,7 +133,7 @@ class InlineCompletionService(private val project: Project) : Disposable { messageBusConnection.subscribe(SettingsService.Listener.TOPIC, object : SettingsService.Listener { override fun settingsChanged(settings: SettingsService.Settings) { logger.debug("TriggerMode updated: ${settings.completionTriggerMode}") - shouldAutoTrigger = triggerMode == SettingsState.TriggerMode.AUTOMATIC + shouldAutoTrigger = settings.completionTriggerMode == SettingsState.TriggerMode.AUTOMATIC } }) messageBusConnection.subscribe(DocumentListener.TOPIC, object : DocumentListener { @@ -431,6 +431,10 @@ class InlineCompletionService(private val project: Project) : Disposable { messageBusConnection.dispose() } + /** + * @deprecated + * This is not used anymore and should be removed. + */ interface Listener { fun loadingStateChanged(loading: Boolean) {}