siramix / buzzwords

A mobile word game that will change the word.

Home Page:www.siramix.com/buzzwords

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rework Pref Saving in TurnActivity

edwardrowe opened this issue · comments

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.

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.