Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go install made possible #112

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
removec changes from other commit
  • Loading branch information
f01c33 committed May 11, 2024
commit 54b30db1b307aee1aa23d3adf856e7d6ec3ef391
10 changes: 7 additions & 3 deletions bubble/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ func (m *Model) updateHelpScreen(msg tea.Msg) (*Model, tea.Cmd) {
}

func (m *Model) updateCursor() {
m.cursor = 0
m.cursor = min(m.cursor, m.Paginator.ItemsOnPage(len(m.VisibleItems()))-1)
}

func (m *Model) categoryHasStories(cat int) bool {
Expand All @@ -675,15 +675,19 @@ func (m *Model) categoryHasStories(cat int) bool {

func (m *Model) changeToNextCategory() {
m.cat.Next(m.favorites.HasItems())
currentCategory := m.cat.GetCurrentCategory(m.favorites.HasItems())

m.Paginator.Page = 0
m.cursor = 0
m.cursor = min(m.cursor, len(m.items[currentCategory])-1)
m.updatePagination()
}

func (m *Model) changeToPrevCategory() {
m.cat.Prev(m.favorites.HasItems())
currentCategory := m.cat.GetCurrentCategory(m.favorites.HasItems())

m.Paginator.Page = 0
m.cursor = 0
m.cursor = min(m.cursor, len(m.items[currentCategory])-1)
m.updatePagination()
}

Expand Down