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
mirrorAppearanceState
and initially hidden views
#19
Comments
Hello @kabouzeid, You're correct, since You do not report a bug in GRDBQuery. Now, if |
Thanks! I'm experimenting with different ways to get around this right now. I'll report back once I find a good solution. What threw me off initially is this comment: GRDBQuery/Sources/GRDBQuery/Query.swift Lines 367 to 379 in b2c3a01
|
Thank you @kabouzeid, I'll rewrite this documentation so that it better describes the reality. |
I hope f8443a2 makes the doc less ambiguous. I agree that delaying the first database access until the View appears on screen is a reasonable need. Your It just happens that
Thank you! Maybe you'll want to perform modification to the library itself: I'll happily welcome a pull request, and guide you if you meet difficulties. |
My PR implements the behaviour I'm looking for with minimal changes: Fetch once immediately, then only start auto updating once I set |
Yup. This is not acceptable, I'm sorry. Dealing with the initial state of the view is the most important feature of the lib. Please read again the Why @Query? paragraph. |
The initial state is still fetched immediately (before Basically |
All right, I'll have a better look. Thanks for pointing my mistaken interpretation :-) |
Perhaps you'll like #22 better. It allows both @Query(Request(), in: \.database) private var values: [Value] // same as before, `isAutoupdating = true` by default and @Query(Request(), in: \.database, isAutoupdating: false) private var values: [Value]
...
.mirrorAppearanceState(to: $values.isAutoupdating) |
🚀 v0.3.0 has shipped with QueryObservation, which addresses shortcomings of |
I have a
View
within aTabView
, and I'm using.mirrorAppearanceState
on theView
. Initially theView
's tab is not selected and thus the View is not visible.The problem is that the
View
will now keep auto updating in the background until the respective tab is selected for the first time.onDisappear
is not called because theView
never appeared in the first place.The text was updated successfully, but these errors were encountered: