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

Add append function to @ObservedSectionedResults #8625

Open
sync-by-unito bot opened this issue Jun 13, 2024 · 1 comment
Open

Add append function to @ObservedSectionedResults #8625

sync-by-unito bot opened this issue Jun 13, 2024 · 1 comment

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Jun 13, 2024

We could add an append function to @ObservedSectionedResults

public func append(_ value: Value.Element.Element) where Value.Element.Element: Object {
  write(wrappedValue) { collection in
     collection.realm!.add(value)
  }
}

Users would be able to append objects to the collection used within @ObservedResultsSection without having a reference to the realm or having to thaw the realm from the wrappedValue

Copy link
Author

sync-by-unito bot commented Jun 13, 2024

➤ PM Bot commented:

Jira ticket: RCOCOA-2388

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

No branches or pull requests

0 participants