Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/data/schemas/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ schematize:
default:
details: |
By default, the dashboard is configured to:

- Display the preview pane with a width of 50 columns for all work items.
- Only fetch 20 PRs and issues at a time for each section.
- Display the PRs view when the dashboard loads.
Expand Down Expand Up @@ -61,7 +61,7 @@ properties:
weight: 2
details: |
This setting defines how many PRs the dashboard should fetch for each section when:

- The dashboard first loads.
- The [sref:fetch interval] elapses.
- You navigate to the next PR in a table without another fetched PR to display.
Expand All @@ -80,7 +80,7 @@ properties:
weight: 3
details: |
This setting defines how many issues the dashboard should fetch for each section when:

- The dashboard first loads.
- The [sref:fetch interval] elapses.
- You navigate to the next issue in a table without another fetched issue to display.
Expand Down Expand Up @@ -146,14 +146,16 @@ properties:

By default, the dashboard refetches work items every 30 minutes.

To disable the refetching interval set it to 0.

You can always use the [refresh current section] or [refresh all sections] command to
refetch work items in the current view. If you change the search query for a view, the
dashboard fetches results for the updated query immediately.

[refresh current section]: /getting-started/keybindings/global/#refresh-current-section
[refresh all sections]: /getting-started/keybindings/global/#refresh-all-sections
type: integer
minimum: 1
minimum: 0
default: 30
dateFormat:
title: Date format
Expand Down
4 changes: 4 additions & 0 deletions ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,10 @@ func fetchUser() tea.Msg {
type intervalRefresh time.Time

func (m *Model) doRefreshAtInterval() tea.Cmd {
if m.ctx.Config.Defaults.RefetchIntervalMinutes == 0 {
return nil
}

return tea.Tick(
time.Minute*time.Duration(m.ctx.Config.Defaults.RefetchIntervalMinutes),
func(t time.Time) tea.Msg {
Expand Down
Loading