Skip to content

Commit

Permalink
Back out "Cancel fresco slideshow timers on unmount"
Browse files Browse the repository at this point in the history
Reviewed By: AdamMcCormick

Differential Revision: D57217232

fbshipit-source-id: a8303f49d781c19359c789d984c12f4454016bb6
  • Loading branch information
Haiting Pu authored and facebook-github-bot committed May 10, 2024
1 parent 36fb93b commit 2311b70
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,7 @@ object FrescoVitoSlideshowComponentSpec {

@JvmStatic
@OnUnmount
internal fun onUnmount(
c: ComponentContext,
slideshowDrawable: FrescoVitoSlideshowDrawable<*>,
@State(canUpdateLazily = true) timer: Timer,
) {
timer.cancel()
timer.purge()
FrescoVitoSlideshowComponent.lazyUpdateTimer(c, Timer("Fresco Vito slideshow timer"))
internal fun onUnmount(c: ComponentContext, slideshowDrawable: FrescoVitoSlideshowDrawable<*>) {
val controller = FrescoVitoProvider.getController()
controller.releaseImmediately(slideshowDrawable.previousImage)
controller.releaseImmediately(slideshowDrawable.currentImage)
Expand Down

0 comments on commit 2311b70

Please sign in to comment.