Skip to content
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

Notify observers if anything changes #390

Closed
wants to merge 3 commits into from
Closed

Notify observers if anything changes #390

wants to merge 3 commits into from

Conversation

diareuse
Copy link

Due to fact that onChanged() method responds only to notifyDataSetChanged() call, other calls (notifyItemChanged, notifyItemMoved, etc..) are left hanging. Observer has to be notified if any (and all) of those calls are invoked.

And I'm sorry for the import misplacement.

Due to fact that onChanged() method responds only to notifyDataSetChanged() call, other calls (notifyItemChanged, notifyItemMoved, etc..) are left hanging. Observer has to be notified if any (and all) of those calls are invoked.
@diareuse
Copy link
Author

#310

@serj-lotutovici
Copy link

Maybe it makes sense to have an event object, that would reflect the type of change that occurred?
Otherwise the api seams incomplete.

@diareuse
Copy link
Author

Idk whether that's necessary. Until now it wasn't supposed to reflect anything; just alert the subscriber that dataset changed which is by this commit extended for all dataset changes.

However I'm not saying that's bad idea.

@JakeWharton
Copy link
Owner

I'd rather have granular notifications for these available via a different overload.

@diareuse
Copy link
Author

Do you mean something like supplying observer with some enum of state that has changed? Or absolutely different approach?

@JakeWharton
Copy link
Owner

JakeWharton commented Jun 28, 2017 via email

diareuse and others added 2 commits June 28, 2017 22:31
Make dataChanges return T wrapped in event that presumably occurred. Classes *Event (base), *ChangeEvent, *RangeChangeEvent, *InsertionEvent, *RemovalEvent, *MoveEvent have been created to distinct events.
@diareuse diareuse closed this Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants