instant reload if removing more than 10k items

This commit is contained in:
Nihaal Sharma committed 2026-05-01 17:19:36 +01:00
1 parent ab0320e4d1
commit cf218bb440
1 file changed
+3 -1
@@ -26,8 +26,10 @@ struct EmojiTableView: UIViewRepresentable {
let itemsBefore = context.coordinator.items
let itemsAfter = items
context.coordinator.items = items
// guard itemsBefore != itemsAfter else { return }
Task.detached {
if itemsAfter.count == 0 {
if itemsBefore.count-itemsAfter.count > 10_000 {
//removing more than 10k
await context.coordinator.instantApplySnapshot()
} else {
await context.coordinator.applySnapshot(animated: true)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.