logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

setter.js (734B)


  1. export const SET_BROWSER_SUPPORT = 'PUSH_NOTIFICATIONS_SET_BROWSER_SUPPORT';
  2. export const SET_SUBSCRIPTION = 'PUSH_NOTIFICATIONS_SET_SUBSCRIPTION';
  3. export const CLEAR_SUBSCRIPTION = 'PUSH_NOTIFICATIONS_CLEAR_SUBSCRIPTION';
  4. export const SET_ALERTS = 'PUSH_NOTIFICATIONS_SET_ALERTS';
  5. export function setBrowserSupport (value) {
  6. return {
  7. type: SET_BROWSER_SUPPORT,
  8. value,
  9. };
  10. }
  11. export function setSubscription (subscription) {
  12. return {
  13. type: SET_SUBSCRIPTION,
  14. subscription,
  15. };
  16. }
  17. export function clearSubscription () {
  18. return {
  19. type: CLEAR_SUBSCRIPTION,
  20. };
  21. }
  22. export function setAlerts (path, value) {
  23. return dispatch => {
  24. dispatch({
  25. type: SET_ALERTS,
  26. path,
  27. value,
  28. });
  29. };
  30. }