Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-73

Add support for keypath filtering for notifications

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 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@mongodb.com Ferdinando Papale
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: