Skip to content
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

Content Updated Changes #196

Merged
merged 3 commits into from Aug 19, 2020
Merged

Content Updated Changes #196

merged 3 commits into from Aug 19, 2020

Conversation

kyleve
Copy link
Collaborator

@kyleve kyleve commented Aug 18, 2020

No description provided.

self.coordination.coordinator.wasCreated()
/// Now that we are set up, notify callbacks.

self.model.onInsert?(.init(item: self.model))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be in the update callback

@@ -281,7 +301,8 @@ extension PresentationState

func wasRemoved()
{
self.coordination.coordinator.wasRemoved()
self.model.onRemove?(.init(item: self.model))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs updateCallbacks

moved: { old, new, changes, section in section.update(with: old, new: new, changes: changes, dependencies: dependencies) },
noChange: { old, new, changes, section in section.update(with: old, new: new, changes: changes, dependencies: dependencies) }
removed: { _, section in
updateCallbacks.add {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass in instead

@@ -853,6 +865,38 @@ public final class ListView : UIView
}


public final class UpdateCallbacks {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test me

@kyleve kyleve force-pushed the kve/change-to-content-updated branch from b304a17 to a59f3ec Compare August 19, 2020 22:45
@kyleve kyleve merged commit 6e80ad1 into main Aug 19, 2020
@kyleve kyleve deleted the kve/change-to-content-updated branch August 19, 2020 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant