Skip to content

Commit

Permalink
fix: reset sub-page state on BUTTON_B press
Browse files Browse the repository at this point in the history
- Added logic to reset `current_sub_page` to 0 when BUTTON_B is pressed to ensure correct pagination behavior.
  • Loading branch information
dawidrylko committed Jul 10, 2024
1 parent 75ce532 commit bec511b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions badger_os/examples/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ def update_repo(increment):
update_page(-1)
changed = True
if badger.pressed(badger2040.BUTTON_B):
state["current_sub_page"] = 0
changed = True
if badger.pressed(badger2040.BUTTON_C):
update_page(1)
Expand Down

0 comments on commit bec511b

Please sign in to comment.