2
2
mirror of https://github.com/mastodon/mastodon synced 2025-04-12 00:56:38 +02:00

Fix editing and redrafting polls (#34430)

This commit is contained in:
Claire 2025-04-11 11:35:36 +02:00 committed by GitHub
parent 720889cc97
commit 5bf6b82625
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -491,9 +491,9 @@ export const composeReducer = (state = initialState, action) => {
if (action.status.get('poll')) {
map.set('poll', ImmutableMap({
options: action.status.getIn(['poll', 'options']).map(x => x.get('title')),
multiple: action.status.getIn(['poll', 'multiple']),
expires_in: expiresInFromExpiresAt(action.status.getIn(['poll', 'expires_at'])),
options: ImmutableList(action.status.get('poll').options.map(x => x.title)),
multiple: action.status.get('poll').multiple,
expires_in: expiresInFromExpiresAt(action.status.get('poll').expires_at),
}));
}
});
@ -520,9 +520,9 @@ export const composeReducer = (state = initialState, action) => {
if (action.status.get('poll')) {
map.set('poll', ImmutableMap({
options: action.status.getIn(['poll', 'options']).map(x => x.get('title')),
multiple: action.status.getIn(['poll', 'multiple']),
expires_in: expiresInFromExpiresAt(action.status.getIn(['poll', 'expires_at'])),
options: ImmutableList(action.status.get('poll').options.map(x => x.title)),
multiple: action.status.get('poll').multiple,
expires_in: expiresInFromExpiresAt(action.status.get('poll').expires_at),
}));
}
});