Skip to content

Commit

Permalink
fix: attempt to fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
dlvhdr committed Dec 21, 2024
1 parent a866a9a commit d0c6b32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ui/components/issuessection/issuessection.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ func (m Model) GetTotalCount() *int {
if m.IsLoading() {
return nil
}
return &m.TotalCount
c := m.TotalCount
return &c
}

func (m Model) IsLoading() bool {
Expand Down
4 changes: 3 additions & 1 deletion ui/components/prssection/prssection.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ func (m Model) Update(msg tea.Msg) (section.Section, tea.Cmd) {
m.Table.SetRows(m.BuildRows())
m.Table.UpdateLastUpdated(time.Now())
m.UpdateTotalItemsCount(m.TotalCount)

}
}

Expand Down Expand Up @@ -502,7 +503,8 @@ func (m Model) GetTotalCount() *int {
if m.IsLoading() {
return nil
}
return &m.TotalCount
c := m.TotalCount
return &c
}

func (m Model) IsLoading() bool {
Expand Down
3 changes: 2 additions & 1 deletion ui/components/reposection/reposection.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,8 @@ func (m *Model) GetTotalCount() *int {
return nil
}

return utils.IntPtr(len(m.Branches))
c := len(m.Branches)
return &c
}

func (m *Model) SetIsLoading(val bool) {
Expand Down

0 comments on commit d0c6b32

Please sign in to comment.