siramix / buzzwords

A mobile word game that will change the word.
www.siramix.com/buzzwords
GNU General Public License v3.0
10 stars 1 forks source link

Rework Pref Saving in TurnActivity #110

Closed edwardrowe closed 11 years ago

edwardrowe commented 11 years ago

If you background the app during the TimesUp, many preferences are not stored. When restoring, this creates an issue.

I'm gonna take a stab cleaning this up. I'm thinking about having boolean member variables for everything, which the application would flag in realtime, and storing them onPause.

edwardrowe commented 11 years ago

I did a sweep of this. The gist of my change was to always create a game in OnCreate using the state of the preferences. A new Turn would be created from all unfound preferences, so it would use default values. When the app is paused, it saves the state into the preferences. When it advances to TurnSummary, it clears the preferences so that on the next Turn it creates it anew.