cozy / cozy-emails

Email Client for Cozy
GNU Affero General Public License v3.0
66 stars 41 forks source link

Migrate Settings Store to redux #908

Closed gregorylegarec closed 7 years ago

gregorylegarec commented 7 years ago

Thanks @anaerio to review this PR.

As we discussed, I created a pure getter for Settings.

I hesitated on the way to build the settings State, between using a single Map for the whole state or using a property.

DEFAULT_STATE = Immutable.Map()
#or
DEFAULT_STATE =
  settings: Immutable.Map()

I kept the second solution to be consistent with the other migrations, but it forces us to call :

reduxStore.getState().settings.settings