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

fix: app crash on going back from similar fragment' #1489

Merged
merged 1 commit into from
Mar 31, 2019

Conversation

addiegupta
Copy link
Contributor

Fixes: #1474

Changes:

  • On selecting a similar event from the EventDetailsFragment, a newEventDetailsFragment is created for the selected event.
  • However using Koin DI, the same adapter object was being used.
  • This resulted in app crashes on going back from the new event.
  • This commit fixes the issue by instantiating the SimilarEventsListAdapter using its constructor and not KOIN DI

Additional Changes

  • Removed shuffling of list of Similar events so that the fragment returns to the original order on pressing back
  • Corrected a typo in the word 'similar' in SimilarEventsViewModel

Screenshots for the change:

prsimilarfragmentscrash

Fixes: fossasia#1474

Changes:

- On selecting a similar event from the EventDetailsFragment, a newEventDetailsFragment is created for the selected event.
- However using Koin DI, the same adapter object was being used.
- This resulted in app crashes on going back from the new event.
- This commit fixes the issue by instantiating the SimilarEventsListAdapter using its constructor and not KOIN DI

Additional Changes

- Removed shuffling of list of Similar events so that the fragment returns to the original order on pressing back
- Corrected a typo in the word 'similar' in `SimilarEventsViewModel`
@addiegupta
Copy link
Contributor Author

Nothing is breaking and I think this should be good for this release

@iamareebjamal iamareebjamal changed the title 'fix: app crash on going back from similar fragment' fix: app crash on going back from similar fragment' Mar 31, 2019
@iamareebjamal iamareebjamal merged commit 4966b07 into fossasia:development Mar 31, 2019
@addiegupta addiegupta deleted the 1474 branch April 1, 2019 04:29
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.

App crash on going back from a similar event
4 participants