Restore glitch-soc's support of custom poll limits

This commit is contained in:
Claire
2024-02-22 23:01:58 +01:00
parent 9c10aaa4d5
commit 5fd50756b4
2 changed files with 4 additions and 3 deletions

View File

@@ -55,7 +55,7 @@ import {
import { REDRAFT } from '../actions/statuses';
import { STORE_HYDRATE } from '../actions/store';
import { TIMELINE_DELETE } from '../actions/timelines';
import { me, defaultContentType } from '../initial_state';
import { me, defaultContentType, pollLimits } from '../initial_state';
import { recoverHashtags } from '../utils/hashtag';
import { unescapeHTML } from '../utils/html';
import { overwrite } from '../utils/js_helpers';
@@ -369,7 +369,7 @@ const updatePoll = (state, index, value) => state.updateIn(['poll', 'options'],
if (tmp.size === 0) {
return tmp.push('').push('');
} else if (tmp.size < 4) {
} else if (tmp.size < pollLimits.max_options) {
return tmp.push('');
}