Skip to content

Commit

Permalink
fix:handle no internet connection better
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Jan 6, 2024
1 parent bdf9450 commit 7af5445
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pluginUntilBuild=235.*
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType=IC
#platformVersion=LATEST-EAP-SNAPSHOT
platformVersion=2023.2.5
platformVersion=2023.3.2

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class WorkflowRunListLoader(
Disposer.register(parentDisposable, this)
val scheduler = AppExecutorUtil.getAppScheduledExecutorService()
task = scheduler.scheduleWithFixedDelay({
if (refreshRuns) loadMore(update = true)
if (refreshRuns && error == null) loadMore(update = true)
}, 1, frequency(), TimeUnit.SECONDS)
LOG.debug("Create CollectionListModel<WorkflowRun>() and loader")
listModel.removeAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,10 @@ internal class WorkflowRunListLoaderPanel(
return
}
LOG.warn("Got error when getting workflow-runs: $error")
runListComponent.emptyText.appendText(
runListComponent.emptyText.setText(
"Can't load workflow runs - check that the token you set in GitHub settings have sufficient permissions",
SimpleTextAttributes.ERROR_ATTRIBUTES
).appendSecondaryText(
).appendLine(
getLoadingErrorText(workflowRunsLoader.url, error),
SimpleTextAttributes.ERROR_ATTRIBUTES,
null
Expand Down

0 comments on commit 7af5445

Please sign in to comment.