|
|
|
|
@ -526,8 +526,13 @@ export const composeReducer = (state = initialState, action) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (action.status.get('poll')) {
|
|
|
|
|
let options = ImmutableList(action.status.get('poll').options.map(x => x.title));
|
|
|
|
|
if (options.size < action.maxOptions) {
|
|
|
|
|
options = options.push('');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
map.set('poll', ImmutableMap({
|
|
|
|
|
options: ImmutableList(action.status.get('poll').options.map(x => x.title)),
|
|
|
|
|
options: options,
|
|
|
|
|
multiple: action.status.get('poll').multiple,
|
|
|
|
|
expires_in: expiresInFromExpiresAt(action.status.get('poll').expires_at),
|
|
|
|
|
}));
|
|
|
|
|
@ -558,8 +563,13 @@ export const composeReducer = (state = initialState, action) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (action.status.get('poll')) {
|
|
|
|
|
let options = ImmutableList(action.status.get('poll').options.map(x => x.title));
|
|
|
|
|
if (options.size < action.maxOptions) {
|
|
|
|
|
options = options.push('');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
map.set('poll', ImmutableMap({
|
|
|
|
|
options: ImmutableList(action.status.get('poll').options.map(x => x.title)),
|
|
|
|
|
options: options,
|
|
|
|
|
multiple: action.status.get('poll').multiple,
|
|
|
|
|
expires_in: expiresInFromExpiresAt(action.status.get('poll').expires_at),
|
|
|
|
|
}));
|
|
|
|
|
|