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

Pause/Stop slideshow when CardsView not visible #34

Merged
merged 3 commits into from
Sep 15, 2024
Merged

Pause/Stop slideshow when CardsView not visible #34

merged 3 commits into from
Sep 15, 2024

Conversation

DashTheDev
Copy link
Contributor

Description

This PR aims to address issue #33 and add more resource management for the CardsView.

  • A NaN check was implemented on the CarouselProcessor to combat the crash in the issue.
  • CardsView slideshows are now stopped & resumed depending on the state of the CardsView's visibility (through IsVisible and Opacity) to help prevent extra processing.
  • The CardsView's handler is now disconnected on view unload to help cleanup resources/memory (in alignment with Microsoft's recommendations).
  • CardsView slideshows are now stopped on view unload/cleanup as I noticed that they were still processing when the view had been "destroyed". This should cleanup strong references that might have been preventing the GC from collecting the view.

Platforms Tested

  • Android
  • iOS
  • Windows

…nted fix for NaN values on Carousel item change.
Copy link
Owner

@AndreiMisiukevich AndreiMisiukevich left a comment

Choose a reason for hiding this comment

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

Thank you!

@AndreiMisiukevich AndreiMisiukevich merged commit bd8fe82 into AndreiMisiukevich:main Sep 15, 2024
@DashTheDev DashTheDev deleted the fix/slideshow-visibility-crash branch September 15, 2024 22:33
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.

2 participants