gdg-x / frisbee

[DEPRECATED] Android application for GDG members and organizers
https://play.google.com/store/apps/details?id=org.gdg.frisbee.android
Apache License 2.0
265 stars 169 forks source link

Fix scroll preserving in Main page on chapter change #699

Closed tasomaniac closed 8 years ago

tasomaniac commented 8 years ago

This PR refactors MainActivity's selected chapter handling and create a new PagerAdapter every time a chapter has changed.

For that selectedChapterId was not enough. I decided to use regular Chapter object with name and id in it. It made lots of things easier.

Also I've moved stuff around to make it more readable at the end.

Fixes #597