-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Caching data of previously presented screen #101
Comments
resolved |
I can confirm and was able to reproduce the issue at 2.4.2
If you verify the video bellow, even thou we randomize and instaciate a new subscriptionview every time it is created, if the viewmodel is still around, a new one is not generated (as no print statement is provided). Cache.Bug.mp4 |
@FulcrumOne It kept in my mind that I hadn't tested throughly. I decided to compare against Apple FullScreen and when comparing with PopupView it does have an issue regarding some sortof cache issue. If possible I would re-open this issue.
|
@dentvii, thanks. We discussed this problem with @jay-jay-lama and it is quite a complicated issue; Nevertheless, I agree with you that we should reopen this Issue, as we are planning to refactor the code in version 3.0.0; therefore maybe we can find a better solution to this problem (if you have any ideas, feel free to contribute). Thanks again and have a great day, |
Yeah, sure it is a dev focused on testing type indeed.
My best guess for a workaround would be adding a date to the string that identifies the popup, but this might conflict with dismissing popups of a certain type.
I will try latter and return
Thanks!
‘’’
public extension Popup {
var id: String { “.init(describing: Self.self)\(Date())” }
var body: V { createContent() }
func configurePopup(popup: Config) -> Config { popup }
}
‘’’
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Zaphod Beeblebrox ***@***.***>
Sent: Thursday, June 13, 2024 4:13:19 PM
To: Mijick/PopupView ***@***.***>
Cc: Felipe Veiga ***@***.***>; Mention ***@***.***>
Subject: Re: [Mijick/PopupView] Caching data of previously presented screen (Issue #101)
@dentvii<https://github.com/dentvii>, thanks.
We discussed this problem with @jay-jay-lama<https://github.com/jay-jay-lama> and it is quite a complicated issue; @State needs about 0.48 seconds to release memory from a previously closed view. In previous versions we solved this problem by speeding up the closing animation, however, this resulted in an animation that was not very appealing.
From version 2.2.0, we decided to sacrifice a bit of safety in favour of appearance, because we found that the problem would only occur if the user tried to open the same popup within 0.3 seconds after closing it.
Nevertheless, I agree with you that we should reopen this Issue, as we are planning to refactor the code in version 3.0.0; therefore maybe we can find a better solution to this problem (if you have any ideas, feel free to contribute).
Thanks again and have a great day,
T.K.
—
Reply to this email directly, view it on GitHub<#101 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAAVPGB7RRU5WPHJ2HCMG4LZHHVM7AVCNFSM6AAAAABIJWTWVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRWGU4DSMBSGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Tap on different items opens screen with cached information
To fix it is needed to use a pause with 0.4 sec before opening the new screen
The text was updated successfully, but these errors were encountered: