mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 12:44:51 +00:00
fixed unnecesary reloads
This commit is contained in:
2 files changed
+6
-22
No files matched your search
@@ -30,11 +30,13 @@ struct EmojiCollectionView: UIViewRepresentable {
|
||||
|
||||
func updateUIView(_ uiView: UICollectionView, context: Context) {
|
||||
context.coordinator.hoarder = hoarder
|
||||
context.coordinator.items = items
|
||||
context.coordinator.pack = pack
|
||||
context.coordinator.edit = edit
|
||||
context.coordinator.onRemove = onRemove
|
||||
uiView.reloadData()
|
||||
if items != context.coordinator.items || context.coordinator.pack != pack {
|
||||
context.coordinator.items = items
|
||||
context.coordinator.pack = pack
|
||||
uiView.reloadData()
|
||||
}
|
||||
}
|
||||
|
||||
func makeCoordinator() -> Coordinator {
|
||||
|
||||