LeoNatan / LNPopupUI

A SwiftUI library for presenting views as popups, much like the Apple Music and Podcasts apps.
MIT License
320 stars 29 forks source link

Updating popup content while popup is closing causes popup to get stuck in a loop of closing and opening endlessly. #35

Closed Cleover closed 7 months ago

Cleover commented 8 months ago

Describe the Bug If while the popup is animating to close, the popup's internal content changes, it will get stuck in an endless loop of closing and opening again.

To Reproduce I have created another extremely basic SwiftUI app to show this bug, https://pastie.io/lgfkwf.swift xD

  1. Swipe to open popup
  2. Swipe to close popup and while its closing, click the "Update Popup Content" button

Expected Behavior Popup would not open when content changes while closing the popup

Screenshots Demo App Bug: https://github.com/LeoNatan/LNPopupUI/assets/40129637/cc17f6d8-7b4d-48d5-8c1e-1e4b4e898af4

LeoNatan commented 8 months ago

🤦‍♂️🤣

I’ll look tomorrow. Probably more state/queue issues.

LeoNatan commented 8 months ago

Couldn’t you just write your app in UIKit? All those issues don’t exist there. 🤣

Cleover commented 8 months ago

😂 It's starting to feel like that would make my life easier, I'm just in too deep now.

LeoNatan commented 8 months ago

Please try with 1.7.3 and let me know if things have improved.

Cleover commented 7 months ago

LGTM 👍 Thanks Again!

LeoNatan commented 7 months ago

It worked? Nice!