Add replay button to timer completion popup#8
Open
sirgeb27 wants to merge 3 commits into
Open
Conversation
Adds a circular-arrow icon to the SELECT (middle) button on the "Time's Up!" popup, which restarts the timer with its original duration. The existing UP=snooze and DOWN=dismiss buttons are unchanged. Also registers the IMAGE_REPLAY resource and fixes pbi8 -> bitmap type for CloudPebble compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a replay button (SELECT/middle) to the "Time's Up!" popup, which
restarts the timer with its original duration. The existing UP=snooze
(1 min) and DOWN=dismiss buttons are unchanged.
Use case
When using timers for repetitive actions — holding stretches, power
hours, interval training — the current flow requires two button presses
to restart: dismiss the popup, then navigate back to the timer and
press play. The replay button reduces this to one press from the
completion screen.
Changes
src/popup_window.c— load/destroyreplay_icon; assign toBUTTON_ID_SELECTon the action barsrc/popup_window.h— updatedPopupWindowSelectClicktypedef topass
CountdownTimer*(consistent withPopupWindowUpClick)src/main.c—popup_window_replay_timer_callback()restarts thetimer using its original duration via
countdown_timer_get_duration()package.json— registersIMAGE_REPLAYresourceresources/images/action_bar_icon_replay.png— circular arrow iconNotes
The SELECT button callback slot was already scaffolded in
PopupWindowCallbackswith a null-check but unused. This PR fills it.Aware of #7 (popup layout overlap on taller screens) — that fix is
complementary and doesn't conflict with this change.