Skip to content

Conversation

@mmind
Copy link

@mmind mmind commented May 26, 2025

Commit 0aead42 ("navigation: Add is available (#1847)") added the ability to draw the app icon in grey and in a disabled state when some prerequisits were not met. Only the Navigation app was using this mechanism due to its icons being stored in the external memory and possibly missing.

Commit 63e0c4f ("Application selection at build time") broke this by always setting the state as true:
for (const auto& userApp : userApps) {
apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true};
}

Fix this by creating an isAvailable() strcuture in the app classes, similar
to how the Watchfaces handle the same problem of checking availability.

@mark9064 mark9064 added bug Something isn't working UI/UX User interface/User experience labels May 26, 2025
@mmind mmind mentioned this pull request May 27, 2025
@github-actions
Copy link

github-actions bot commented May 27, 2025

Build size and comparison to main:

Section Size Difference
text 379204B 224B
data 944B 0B
bss 22536B 0B

Run in InfiniEmu

@mmind mmind force-pushed the navigation-check-disable branch 3 times, most recently from 08abd5e to f2f5ec3 Compare May 29, 2025 20:36
@NeroBurner NeroBurner added this to the 1.16.0 milestone May 29, 2025
@NeroBurner
Copy link
Contributor

Fixing it for just one App feels wrong for me. Would you be interested in implementing the same behavior as done with the Watchfaces?

Having a default isAvailable function returning true, and override it for Apps that need it. In our case just Navigation

@mmind
Copy link
Author

mmind commented Jun 1, 2025

@NeroBurner sure, I can do that :-) .

I stumbled upon that thing while doing the other navigation stuff and InfiniSim not showing the flags, but also did not have a grasp on how the whole thing works.

So you're definitly right, doing that only for Navigation does not scale :-) and also thanks for pointing out how things should look correctly.

@mmind mmind force-pushed the navigation-check-disable branch from f2f5ec3 to 915a9bd Compare June 1, 2025 19:39
@mmind
Copy link
Author

mmind commented Jun 1, 2025

Hopefully that is what you had in mind :-) ... Follows now how the Wachfaces look

Copy link
Contributor

@NeroBurner NeroBurner left a comment

Choose a reason for hiding this comment

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

I think you got it right. Good job!

Copy link
Member

@mark9064 mark9064 left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for the PR :)

@mmind mmind force-pushed the navigation-check-disable branch from 915a9bd to 7e0b63a Compare July 2, 2025 07:41
Commit 0aead42 ("navigation: Add is available (InfiniTimeOrg#1847)") added the
ability to draw the app icon in grey and in a disabled state when some
prerequisits were not met. Only the Navigation app was using this mechanism
due to its icons being stored in the external memory and possibly missing.

Commit 63e0c4f ("Application selection at build time") broke this by
always setting the state as true:
      for (const auto& userApp : userApps) {
        apps[i++] = Screens::Tile::Applications {userApp.icon, userApp.app, true};
      }

Fix this by creating an isAvailable() strcuture in the app classes, similar
to how the Watchfaces handle the same problem of checking availability.
@mmind mmind force-pushed the navigation-check-disable branch from 7e0b63a to b6c20f6 Compare July 2, 2025 09:51
@mark9064 mark9064 merged commit 9afc23c into InfiniTimeOrg:main Jul 3, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working UI/UX User interface/User experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants