diff --git a/RealmContent/Core/View/ContentViewController.swift b/RealmContent/Core/View/ContentViewController.swift index ef9eb82..75a7948 100644 --- a/RealmContent/Core/View/ContentViewController.swift +++ b/RealmContent/Core/View/ContentViewController.swift @@ -110,7 +110,9 @@ public class ContentViewController: UIViewController, UITableViewDataSource, UIT } } - pageElementsUpdatesToken = page.elements.addNotificationBlock(applyChanges) + pageElementsUpdatesToken = page.elements + .filter(NSPredicate(format: "type in %@", ContentElement.Kind.allRawValues())) + .addNotificationBlock(applyChanges) } private func populateFrom(page: ContentPage) { @@ -124,7 +126,7 @@ public class ContentViewController: UIViewController, UITableViewDataSource, UIT } } - private func applyChanges(_ changes: RealmCollectionChange>) { + private func applyChanges(_ changes: RealmCollectionChange>) { let section = 0 switch changes {