@@ -3,7 +3,7 @@ package com.github.lppedd.cc.configuration
33import com.github.lppedd.cc.CC
44import com.github.lppedd.cc.CCBundle
55import com.github.lppedd.cc.invokeLaterOnEdt
6- import com.intellij.openapi.application.ApplicationManager
6+ import com.github.lppedd.cc.runInBackgroundThread
77import com.intellij.openapi.diagnostic.logger
88import com.intellij.openapi.options.SearchableConfigurable
99import com.intellij.openapi.project.Project
@@ -38,7 +38,7 @@ internal class CCMainConfigurable(private val project: Project) : SearchableConf
3838 gui.customTokensFilePath = configService.customFilePath
3939 gui.customCoAuthorsFilePath = configService.customCoAuthorsFilePath
4040
41- ApplicationManager .getApplication().executeOnPooledThread {
41+ runInBackgroundThread {
4242 val tokensService = CCTokensService .getInstance(project)
4343 val tokens = when (val result = tokensService.getTokens()) {
4444 is TokensResult .Success -> result.tokens
@@ -81,7 +81,7 @@ internal class CCMainConfigurable(private val project: Project) : SearchableConf
8181 configService.customCoAuthorsFilePath = gui.customCoAuthorsFilePath
8282 configService.customFilePath = gui.customTokensFilePath
8383
84- ApplicationManager .getApplication().executeOnPooledThread {
84+ runInBackgroundThread {
8585 val tokensService = CCTokensService .getInstance(project)
8686 val result = tokensService.getTokens()
8787
0 commit comments