-
Notifications
You must be signed in to change notification settings - Fork 61
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
Suspend children #122
Suspend children #122
Conversation
core/src/main/kotlin/com/bumble/appyx/core/children/ChildNodeCreationManager.kt
Fixed
Show fixed
Hide fixed
core/src/main/kotlin/com/bumble/appyx/core/children/ChildNodeCreationManager.kt
Show resolved
Hide resolved
core/src/main/kotlin/com/bumble/appyx/core/children/ChildNodeCreationManager.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/com/bumble/appyx/core/children/ChildNodeCreationManager.kt
Outdated
Show resolved
Hide resolved
fc66b78
to
6d07b42
Compare
6d07b42
to
a549184
Compare
core/src/main/kotlin/com/bumble/appyx/core/children/ChildNodeCreationManager.kt
Fixed
Show fixed
Hide fixed
core/src/main/kotlin/com/bumble/appyx/core/children/ChildNodeCreationManager.kt
Fixed
Show fixed
Hide fixed
core/src/main/kotlin/com/bumble/appyx/core/children/ChildNodeCreationManager.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update StatefulNode2
's description. It currently says that Nodes are always alive. We can write something like "Node can be kept alive if you use KEEP mode"
core/src/main/kotlin/com/bumble/appyx/core/children/ChildEntry.kt
Outdated
Show resolved
Hide resolved
app/src/main/kotlin/com/bumble/appyx/app/node/onboarding/screen/StatefulNode2.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/com/bumble/appyx/core/children/ChildNodeCreationManager.kt
Outdated
Show resolved
Hide resolved
is ChildEntry.Initialized -> | ||
ChildEntry.Suspended( | ||
key = key, | ||
// TODO: Not able to get a scope from Compose here, providing fake one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ticket? What's the impact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on a client usage of SaverScope
. We are providing SaverScope
right now do be able to use canSave
in code, but honestly I do not see any value in it right now because we are supporting Android only. Also not sure if anybody ever used canSave
except Compose internals.
Description
Simple implementation with either keep all or suspend all.
KeepMode
is introduced to specify keep logic of stashed (not visible) nodes. The value is passed directly intoParentNode
.ChildEntry
is refactored intoInitialized
andSuspended
.ChildNodeCreationManager
creates a snapshot of currently initialized and suspended nodes and compares it with the provided by nav model list. After calculating a diff, it applies required changes.Appyx
class moved to the root package and allows to setup default behaviour.Fixes #111
Fixes #120
Strategies
As a separate PR please, this one defines a foundation for further updates and allows faster feedback.
Check list
CHANGELOG.md
if required.