crux-bphc / CMS-Android

A custom Moodle app for the students of BITS Pilani, Hyderabad Campus.
MIT License
28 stars 39 forks source link

Fix: MoreOptionsFragment selections not working after dismissal #272

Closed abhijeetviswa closed 4 years ago

abhijeetviswa commented 4 years ago

Observers need to be removed after the MoreOptionsFragment has been dismissed so that selections aren't observed even after the original instance of the fragment has been dismissed. Further more, dismissal will clear the selection by setting null. However, the next time an observer is attached, it immediately sees this null value. If this isn't handled properly, then no action is performed but the observer will be removed, effectively breaking the entire MoreOptionsFragment.

Close #268