mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 00:38:27 +00:00
[Glitch] Update immutable imports for v5
Port 27e79da6b9 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import Immutable from 'immutable';
|
||||
import { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
import { SET_BROWSER_SUPPORT, SET_SUBSCRIPTION, CLEAR_SUBSCRIPTION, SET_ALERTS } from '../actions/push_notifications';
|
||||
import { STORE_HYDRATE } from '../actions/store';
|
||||
|
||||
const initialState = Immutable.Map({
|
||||
const initialState = ImmutableMap({
|
||||
subscription: null,
|
||||
alerts: new Immutable.Map({
|
||||
alerts: ImmutableMap({
|
||||
follow: false,
|
||||
follow_request: false,
|
||||
favourite: false,
|
||||
@@ -24,7 +24,7 @@ export default function push_subscriptions(state = initialState, action) {
|
||||
|
||||
if (push_subscription) {
|
||||
return state
|
||||
.set('subscription', new Immutable.Map({
|
||||
.set('subscription', ImmutableMap({
|
||||
id: push_subscription.get('id'),
|
||||
endpoint: push_subscription.get('endpoint'),
|
||||
}))
|
||||
@@ -36,11 +36,11 @@ export default function push_subscriptions(state = initialState, action) {
|
||||
}
|
||||
case SET_SUBSCRIPTION:
|
||||
return state
|
||||
.set('subscription', new Immutable.Map({
|
||||
.set('subscription', ImmutableMap({
|
||||
id: action.subscription.id,
|
||||
endpoint: action.subscription.endpoint,
|
||||
}))
|
||||
.set('alerts', new Immutable.Map(action.subscription.alerts))
|
||||
.set('alerts', ImmutableMap(action.subscription.alerts))
|
||||
.set('isSubscribed', true);
|
||||
case SET_BROWSER_SUPPORT:
|
||||
return state.set('browserSupport', action.value);
|
||||
|
||||
Reference in New Issue
Block a user