ResultadosDigitais / matrix

#matrix is the online open-source workplace inspired in sococo.com for distributed teams to have the experience of work together each day, side-by-side. No matter where team members might be. Working in an online workplace is even more productive when people are feeling in the same space.
MIT License
900 stars 238 forks source link

feat: save notification option on localstorage #383

Open augustoscher opened 3 years ago

augustoscher commented 3 years ago

Description

In order to fix https://github.com/ResultadosDigitais/matrix/issues/332 we are persisting user enable/disable notification option on localstorage.

How to test?

  1. Run matrix on augusto/save-notification-option-localstorage branch.
    • [ ] Notifications should be disabled by default.
    • [ ] notification-disabled key shouldn't exists on localstorage.

image

  1. Enable notifications. Enable notifications by clicking on NotificationCheckbox component.
    • [ ] notification-disabled key should be created on localstorage with false value.

image

  1. Disable notifications
    • [ ] Users should be able to disable notifications again from another tab or inside a room

image

Expected behavior

Now matrix will save user notifications option. It will not being necessary enable and disable it every time that page is refreshed or application accessed.