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

Custom skeleton color not persistently adaptive #197

Closed
danqing opened this issue Oct 6, 2019 · 6 comments
Closed

Custom skeleton color not persistently adaptive #197

danqing opened this issue Oct 6, 2019 · 6 comments

Comments

@danqing
Copy link

danqing commented Oct 6, 2019

I have the following code in my app delegate that customizes my skeleton color:

SkeletonAppearance.default.tintColor = Color.skeleton
SkeletonAppearance.default.gradient = SkeletonGradient(baseColor: Color.skeleton)

Here Color.skeleton is an adaptive color that has light/dark mode. And this works - if I open the app in dark mode, the skeletons show up in the dark color.

However, when I background the app, toggle the system light/dark switch (or if it auto changes at sunrise/sunset), then come back to the app, the skeleton still keeps the original color and doesn't automatically switch to the color for the opposite appearance.

All other parts of the app can adjust without problem (and with a nice animation even). It looks SkeletonView somehow caches an absolute color instead of the adaptive parent color in this case.

@stale
Copy link

stale bot commented Dec 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the given up label Dec 5, 2019
@danqing
Copy link
Author

danqing commented Dec 5, 2019

Looks like #199 has fixed this? Can we have a new release please @Juanpe ? Thanks!

@stale stale bot removed the given up label Dec 5, 2019
@stale
Copy link

stale bot commented Feb 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the given up label Feb 3, 2020
@Juanpe
Copy link
Owner

Juanpe commented Feb 9, 2020

Hi @danqing, finally, request #199 has been merged, so you can update the pod, to check if this issue is solved, please?

@danqing
Copy link
Author

danqing commented Feb 11, 2020

Works great. Thanks!

@danqing danqing closed this as completed Feb 11, 2020
@kristofferanger
Copy link

kristofferanger commented Jan 2, 2024

I still have this issue (version 1.30.4). However it happens only if the user swapping between dark/light mode during the animation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants