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

Use ID for notification object if passed to addNotification method #10

Merged
merged 2 commits into from
Dec 9, 2018

Conversation

saravmajestic
Copy link
Contributor

Currently random ID is generated for notification and is passed on onNotificationRemoval. Using this random ID we cannot identify the notification object in redux state for cleaning. So I have passed the ID generated by app and used for creating notification object.

onNotificationRemoval passes ID, which needs to be identified for identifying the correct notification object to remove from react redux state
@coveralls
Copy link

Pull Request Test Coverage Report for Build 44

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 43: 0.0%
Covered Lines: 401
Relevant Lines: 401

💛 - Coveralls

@teodosii
Copy link
Owner

teodosii commented Dec 8, 2018

Code looks ok although it's not clear for me why haven't you been using the id returned by addNotification.

@saravmajestic
Copy link
Contributor Author

I have list of notification objects in state and after notification is hidden, I would like to remove from the state array. For doing this I need to identify which object to be removed. Since the random generated ID is passed, it's not possible to identify the correct notification.

@teodosii teodosii merged commit 635f47b into teodosii:master Dec 9, 2018
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.

3 participants