Skip to content

Resets the appStack when the display is automatically moved back to to the watch face - #2460

Open
SteveAmor wants to merge 1 commit into
InfiniTimeOrg:mainfrom
SteveAmor:appStackReset
Open

Resets the appStack when the display is automatically moved back to to the watch face#2460
SteveAmor wants to merge 1 commit into
InfiniTimeOrg:mainfrom
SteveAmor:appStackReset

Conversation

@SteveAmor

Copy link
Copy Markdown
Contributor

Button presses and gestures to move to another screen pop the previous screen off the App Stack.

When the display times out to go to sleep, if you are on the Notifications or Settings screen, the display automatically goes back to the watch face. This change in screen isn't popped off the App Stack which eventually fills the appStack and causes a button press to jump straight to the watch face rather than the previous screen.

Given the watch face can be considered as the top level screen, this PR prevents the stack overflow/stale-entry behaviour. This is in fact what happens when you do a button:longPress

@github-actions

Copy link
Copy Markdown

Build size and comparison to main:

Section Size Difference
text 385232B 0B
data 944B 0B
bss 22640B 0B

Run in InfiniEmu

@SteveAmor

SteveAmor commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Tested on PineTime hardware and it works as expected and I can't force it into a bad state as per the process in #2461

@mark9064 mark9064 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch

@mark9064 mark9064 added this to the 1.17.0 milestone Jul 31, 2026
@mark9064 mark9064 added the bug Something isn't working label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants