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

ApplicationList: Reset app menu screen when loading watch face #2009

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

vkareh
Copy link
Contributor

@vkareh vkareh commented Feb 9, 2024

This prevents the application list from loading in the last used screen and instead goes back to the first screen whenever the watch face is loaded.

Fixes #2006

Copy link

github-actions bot commented Feb 9, 2024

Build size and comparison to main:

Section Size Difference
text 377096B 16B
data 940B 0B
bss 63516B 0B

@vkareh vkareh mentioned this pull request Feb 9, 2024
1 task
@JF002
Copy link
Collaborator

JF002 commented Feb 11, 2024

Have you checked why the page number of the launcher is actually stored? I wouldn't want to apply a change that conflicts with the original intend of the code.

I think it would also be a good idea to check that the behavior reported in #2006 does not happen for other apps as well, like settings for example (that you can open with a double press on the button iirc)? Maybe the fix should be more generic than it currently is?

@vkareh vkareh force-pushed the reset-app-menu branch 2 times, most recently from 39c37f1 to 842bcae Compare February 12, 2024 15:19
@vkareh
Copy link
Contributor Author

vkareh commented Feb 12, 2024

Have you checked why the page number of the launcher is actually stored? I wouldn't want to apply a change that conflicts with the original intend of the code.

Yes. It was added as part of #217 with the description:

  • Go back to the same menu page when we leave an app

This behaviour is preserved, as we only reset the page when we're not in an app.

I think it would also be a good idea to check that the behavior reported in #2006 does not happen for other apps as well, like settings for example (that you can open with a double press on the button iirc)? Maybe the fix should be more generic than it currently is?

This issue doesn't happen in the settings, since we don't store the current screen there.

@FintasticMan
Copy link
Member

Git bisect says the bug was introduced in 39bc166. There was no call to SetAppMenu removed in that commit... Why didn't the bug occur before?

This prevents the application list from loading in the last used screen
and instead goes back to the first screen whenever the watch face is
loaded.

Fixes InfiniTimeOrg#2006
@JF002
Copy link
Collaborator

JF002 commented Mar 12, 2024

Git bisect says the bug was introduced in 39bc166. There was no call to SetAppMenu removed in that commit... Why didn't the bug occur before?

The call to Settings::SetAppMenu() was done in the ctor of the Clock class, which was removed in this 39bc166 commit!

And I think the @vkareh found a better place for this in DisplayApp so that watch faces do not have to manage this state.

@JF002 JF002 added this to the 1.15.0 milestone Mar 12, 2024
@JF002 JF002 merged commit 3b4b5a5 into InfiniTimeOrg:main Mar 12, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App menu stays at second screen
3 participants