Add support for keypath filtering for notifications

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None

      <!--- Feature Request: Just fill in the first two sections below. -->

      Goals

      To be able to subscribe to a RealmCollection for updates but not trigger a notification if only some linked object is changed.

      Say I have a RealmCollection of Things. I don't always want a notification if only one of the SubThings properties gets updated.

      public class Thing : RealmObject
      {
              public string Name { get; set; }
              public IList<SubThing> SubThings { get; }
      }
      

      <!--- What are you trying to achieve? -->

      Expected Results

      The reason is that I might have recyclerview of Things. If a SubThing changes then a partial cell update should happen using normal data binding within the cell to the SubThing. If a Thing actually changes then I want to call adapter.NotifyDataSetChanged() or some variation on that. What I would consider an actual change would be either a Thing property changing, or the RealmList SubThings being modified (add, remove).

      it would be nice to have the subscribe method something like.

      RealmCollection.SubscribeForNotifications(Callback, notifyLinkedObjectUpdated: false)

      <!--- What did you expect to happen? -->

              Assignee:
              Ferdinando Papale
              Reporter:
              Unito Sync Bot
              Archiver:
              Marc Greenfield

                Created:
                Updated:
                Resolved:
                Archived: