New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fine-grained notifications #601

Closed
ipeisong opened this Issue Jul 17, 2014 · 44 comments

Comments

Projects
None yet
@ipeisong

ipeisong commented Jul 17, 2014

Can I find the object type info? The parameter realm seems does not contain any specific info. That's to say I need update UIs all over the app correct? Thanks.

@astigsen

This comment has been minimized.

Show comment
Hide comment
@astigsen

astigsen Jul 17, 2014

Contributor

Yes, currently the notification is for the entire Realm. Support for more
fine-grained notifications (per object) will come soon.

On Wed, Jul 16, 2014 at 7:41 PM, PeiSong notifications@github.com wrote:

Can I find the object type info? The parameter realm seems does not
contain any specific info. That's to say I need update UIs all over the app
correct? Thanks.


Reply to this email directly or view it on GitHub
#601.

Contributor

astigsen commented Jul 17, 2014

Yes, currently the notification is for the entire Realm. Support for more
fine-grained notifications (per object) will come soon.

On Wed, Jul 16, 2014 at 7:41 PM, PeiSong notifications@github.com wrote:

Can I find the object type info? The parameter realm seems does not
contain any specific info. That's to say I need update UIs all over the app
correct? Thanks.


Reply to this email directly or view it on GitHub
#601.

@alazier alazier added the backlog label Dec 5, 2014

@alazier alazier changed the title from Find the object type being updated from notification to Support querying for the set of changed objects during Realm notifications Dec 5, 2014

@alazier

This comment has been minimized.

Show comment
Hide comment
@alazier

alazier Dec 5, 2014

Contributor

This could be supported by traversing the writelog to create a list of all objects changed in the previous transaction

Contributor

alazier commented Dec 5, 2014

This could be supported by traversing the writelog to create a list of all objects changed in the previous transaction

@alazier alazier added the Blocked label Dec 5, 2014

@bigfish24

This comment has been minimized.

Show comment
Hide comment
@bigfish24

bigfish24 Jan 5, 2015

Contributor

This isn't really an ideal solution, but I built a replacement for NSFetchedResultsController, RBQFetchedResultsController, that works along side a singleton class: RBQRealmNotificationManager that broadcasts object changes.

https://github.com/Roobiq/RBQFetchedResultsController

Currently the notification manager is limited to the developer manually logging the changes when they occur (which will then be rebroadcasted after Realm updates), but an obvious improvement would be to subclass RLMObject and RLMRealm to log the change or the add/delete automatically.

Contributor

bigfish24 commented Jan 5, 2015

This isn't really an ideal solution, but I built a replacement for NSFetchedResultsController, RBQFetchedResultsController, that works along side a singleton class: RBQRealmNotificationManager that broadcasts object changes.

https://github.com/Roobiq/RBQFetchedResultsController

Currently the notification manager is limited to the developer manually logging the changes when they occur (which will then be rebroadcasted after Realm updates), but an obvious improvement would be to subclass RLMObject and RLMRealm to log the change or the add/delete automatically.

@xtazz

This comment has been minimized.

Show comment
Hide comment
@xtazz

xtazz Jan 19, 2015

Any update on that? This can really help especially when displaying Realm objects in the table view to nicely display row animations for deleted, inserted, added or updated rows. Thank you!

xtazz commented Jan 19, 2015

Any update on that? This can really help especially when displaying Realm objects in the table view to nicely display row animations for deleted, inserted, added or updated rows. Thank you!

@persidskiy

This comment has been minimized.

Show comment
Hide comment
@persidskiy

persidskiy Feb 24, 2015

👍 I need it too

persidskiy commented Feb 24, 2015

👍 I need it too

@tgoyne tgoyne self-assigned this Mar 27, 2015

@mgleason

This comment has been minimized.

Show comment
Hide comment
@mgleason

mgleason Mar 31, 2015

Support for more fine-grained notifications (per object) will come soon.

... Any update/timeframe for this (been almost 9-months:()?

mgleason commented Mar 31, 2015

Support for more fine-grained notifications (per object) will come soon.

... Any update/timeframe for this (been almost 9-months:()?

@Antol

This comment has been minimized.

Show comment
Hide comment
@Antol

Antol commented Apr 1, 2015

+1

@skeeet

This comment has been minimized.

Show comment
Hide comment
@skeeet

skeeet Apr 1, 2015

All hope is gone by now :(

skeeet commented Apr 1, 2015

All hope is gone by now :(

@bigfish24

This comment has been minimized.

Show comment
Hide comment
@bigfish24

bigfish24 Apr 2, 2015

Contributor

While I know it would be ideal if Realm supported it natively now, if you need something soon check out: https://github.com/Roobiq/RBQRealmNotificationManager.

It's easy to track changes when editing a RLMObject by building a wrapper method for the object that uses blocks such as:

-(void)editObject:(void(^)(id anObject))block
{
     block(self);
     [[RBQRealmChangeLogger defaultLogger] didChangeObject:self];
}

this way every time you edit an object, just use this method to get automatic change tracking:

[anObject editObject:^(id anObject) {
    anObject.property = foo;
}

the RBQRealmNotificationManager will pass along the change to any listeners. (This is what powers RBQFetchedResultsController that I referenced earlier).

Contributor

bigfish24 commented Apr 2, 2015

While I know it would be ideal if Realm supported it natively now, if you need something soon check out: https://github.com/Roobiq/RBQRealmNotificationManager.

It's easy to track changes when editing a RLMObject by building a wrapper method for the object that uses blocks such as:

-(void)editObject:(void(^)(id anObject))block
{
     block(self);
     [[RBQRealmChangeLogger defaultLogger] didChangeObject:self];
}

this way every time you edit an object, just use this method to get automatic change tracking:

[anObject editObject:^(id anObject) {
    anObject.property = foo;
}

the RBQRealmNotificationManager will pass along the change to any listeners. (This is what powers RBQFetchedResultsController that I referenced earlier).

@Brisdo

This comment has been minimized.

Show comment
Hide comment
@Brisdo

Brisdo Apr 3, 2015

+1

  1. This really should be renamed "Fine-grained notifications" or some-such.
  2. I sense that once folks saw the comment it was "coming soon" they stopped commenting/requesting it (assuming it was being worked on) and as a result, it's not prioritized or getting the attention it needs.

Brisdo commented Apr 3, 2015

+1

  1. This really should be renamed "Fine-grained notifications" or some-such.
  2. I sense that once folks saw the comment it was "coming soon" they stopped commenting/requesting it (assuming it was being worked on) and as a result, it's not prioritized or getting the attention it needs.
@dragomirecky

This comment has been minimized.

Show comment
Hide comment
@dragomirecky

dragomirecky commented Apr 3, 2015

+1

3 similar comments
@zocario

This comment has been minimized.

Show comment
Hide comment
@zocario

zocario commented Apr 4, 2015

+1

@phatblat

This comment has been minimized.

Show comment
Hide comment
@phatblat

phatblat commented Apr 4, 2015

+1

@pzbyszynski

This comment has been minimized.

Show comment
Hide comment
@pzbyszynski

pzbyszynski commented Apr 5, 2015

+1

@timanglade timanglade added P1 and removed backlog labels Apr 28, 2015

@jpsim jpsim changed the title from Support querying for the set of changed objects during Realm notifications to Fine-grained notifications May 3, 2015

@rynti

This comment has been minimized.

Show comment
Hide comment
@rynti

rynti commented May 18, 2015

+1

2 similar comments
@treylon

This comment has been minimized.

Show comment
Hide comment
@treylon

treylon commented May 18, 2015

+1

@thbaja

This comment has been minimized.

Show comment
Hide comment
@thbaja

thbaja commented May 21, 2015

+1

@thbaja

This comment has been minimized.

Show comment
Hide comment
@thbaja

thbaja May 21, 2015

The number of stars that this project has is a testament to the interest in this feature: https://github.com/Roobiq/RBQFetchedResultsController

thbaja commented May 21, 2015

The number of stars that this project has is a testament to the interest in this feature: https://github.com/Roobiq/RBQFetchedResultsController

@paulbruneau

This comment has been minimized.

Show comment
Hide comment
@paulbruneau

paulbruneau Aug 5, 2015

Thanks for the nice response. My co-worker Laura and I watched your webinar the other day and were very happy with your answer. I think your prioritization is logical, thanks for explaining that too. We are looking forward to working with your product.

paulbruneau commented Aug 5, 2015

Thanks for the nice response. My co-worker Laura and I watched your webinar the other day and were very happy with your answer. I think your prioritization is logical, thanks for explaining that too. We are looking forward to working with your product.

@jessepollak

This comment has been minimized.

Show comment
Hide comment
@jessepollak

jessepollak Aug 14, 2015

+1 thanks for the hard work!

jessepollak commented Aug 14, 2015

+1 thanks for the hard work!

@SteveTrewick

This comment has been minimized.

Show comment
Hide comment
@SteveTrewick

SteveTrewick Oct 1, 2015

+1 This was a dealbreaker for me when evaluating Realm for use in some upcoming iOS apps.

SteveTrewick commented Oct 1, 2015

+1 This was a dealbreaker for me when evaluating Realm for use in some upcoming iOS apps.

@peterpaulis

This comment has been minimized.

Show comment
Hide comment
@peterpaulis

peterpaulis commented Oct 30, 2015

+1

3 similar comments
@enricenrich

This comment has been minimized.

Show comment
Hide comment
@enricenrich

enricenrich commented Nov 17, 2015

+1

@edwardIshaq

This comment has been minimized.

Show comment
Hide comment
@edwardIshaq

edwardIshaq commented Dec 3, 2015

👍

@dltlr

This comment has been minimized.

Show comment
Hide comment
@dltlr

dltlr commented Dec 8, 2015

+1

@scherroman

This comment has been minimized.

Show comment
Hide comment
@scherroman

scherroman commented Jan 17, 2016

+1

@meilers

This comment has been minimized.

Show comment
Hide comment
@meilers

meilers Apr 18, 2016

Wow is this happening? Congrats guys! Really need this one!

meilers commented Apr 18, 2016

Wow is this happening? Congrats guys! Really need this one!

@jpsim

This comment has been minimized.

Show comment
Hide comment
@jpsim

jpsim Apr 21, 2016

Contributor

Detailed change information is now included in collection notifications as of #3359 which was just merged into master.

Contributor

jpsim commented Apr 21, 2016

Detailed change information is now included in collection notifications as of #3359 which was just merged into master.

@jpsim jpsim closed this Apr 21, 2016

@jpsim jpsim removed the S:Review label Apr 21, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment