ready for test

This commit is contained in:
viljarb
2026-02-18 20:10:45 +01:00
parent 196145205f
commit 96bab0602f
2 changed files with 4 additions and 4 deletions

View File

@@ -132,7 +132,7 @@ func NewIssueListFromIssues(svc *service.Services, issues []models.Issue, width,
}
func OpenAndInProgressOnly(issues []models.Issue) []models.Issue {
// used for the first window in the dashboard
// used to display issues in the first window in the dashboard
out := make([]models.Issue, 0, len(issues))
for _, issue := range issues {
if issue.Status == models.StatusOpen || issue.Status == models.StatusInProgress {
@@ -143,7 +143,7 @@ func OpenAndInProgressOnly(issues []models.Issue) []models.Issue {
}
func ClosedOnly(issues []models.Issue) []models.Issue {
// used for the second window in the dashboard
// used to display issues in the second window in the dashboard
out := make([]models.Issue, 0, len(issues))
for _, issue := range issues {
if issue.Status == models.StatusClosed {

View File

@@ -159,16 +159,16 @@ func (m *Model) ToggleFocus() {
}
}
// FocusedIssueList returns the issue list of the currently focused window.
func (m *Model) FocusedIssueList() *IssueList {
// return the issue list of the currently focused window so we can use two tui windows for issues
if m.focusedWindow == 0 {
return &m.issueList
}
return &m.closedIssueList
}
// ToggleFocusedWindow switches focus between main and closed issues window.
func (m *Model) ToggleFocusedWindow() {
// switch focus between open/in-progress and closed issues window
m.focusedWindow = 1 - m.focusedWindow
if m.focusedWindow == 0 {
if selected := m.issueList.SelectedItem(); selected.ID != "" {