mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-18 18:48:20 +00:00
[Glitch] Fix editing and redrafting polls
Port 5bf6b82625 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -601,9 +601,9 @@ export const composeReducer = (state = initialState, action) => {
|
|||||||
|
|
||||||
if (action.status.get('poll')) {
|
if (action.status.get('poll')) {
|
||||||
map.set('poll', ImmutableMap({
|
map.set('poll', ImmutableMap({
|
||||||
options: action.status.getIn(['poll', 'options']).map(x => x.get('title')),
|
options: ImmutableList(action.status.get('poll').options.map(x => x.title)),
|
||||||
multiple: action.status.getIn(['poll', 'multiple']),
|
multiple: action.status.get('poll').multiple,
|
||||||
expires_in: expiresInFromExpiresAt(action.status.getIn(['poll', 'expires_at'])),
|
expires_in: expiresInFromExpiresAt(action.status.get('poll').expires_at),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -632,9 +632,9 @@ export const composeReducer = (state = initialState, action) => {
|
|||||||
|
|
||||||
if (action.status.get('poll')) {
|
if (action.status.get('poll')) {
|
||||||
map.set('poll', ImmutableMap({
|
map.set('poll', ImmutableMap({
|
||||||
options: action.status.getIn(['poll', 'options']).map(x => x.get('title')),
|
options: ImmutableList(action.status.get('poll').options.map(x => x.title)),
|
||||||
multiple: action.status.getIn(['poll', 'multiple']),
|
multiple: action.status.get('poll').multiple,
|
||||||
expires_in: expiresInFromExpiresAt(action.status.getIn(['poll', 'expires_at'])),
|
expires_in: expiresInFromExpiresAt(action.status.get('poll').expires_at),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user