mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2025-01-01 11:23:42 +01:00
Vanilla flavor: Reduce amount of data stored in initial state for min_options on polls
This commit is contained in:
parent
3d2fc73ecb
commit
c3bffb95b6
3 changed files with 3 additions and 3 deletions
|
@ -103,7 +103,7 @@ class Option extends React.PureComponent {
|
|||
</label>
|
||||
|
||||
<div className='poll__cancel'>
|
||||
<IconButton disabled={index < pollLimits.min_options} title={intl.formatMessage(messages.remove_option)} icon='times' onClick={this.handleOptionRemove} />
|
||||
<IconButton disabled={index < pollMinOptions} title={intl.formatMessage(messages.remove_option)} icon='times' onClick={this.handleOptionRemove} />
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
|
|
|
@ -133,6 +133,6 @@ export const languages = initialState?.languages;
|
|||
export const maxChars = (initialState && initialState.max_toot_chars) || 500;
|
||||
|
||||
// CatCatNya~ specific settings
|
||||
export const pollLimits = (initialState && initialState.poll_limits);
|
||||
export const pollMinOptions = (initialState && initialState.poll_limits && initialState.poll_limits.min_options) || 2;
|
||||
|
||||
export default initialState;
|
||||
|
|
|
@ -95,7 +95,7 @@ const initialState = ImmutableMap({
|
|||
});
|
||||
|
||||
const initialPoll = ImmutableMap({
|
||||
options: ImmutableList(new Array(pollLimits.min_options).fill('')),
|
||||
options: ImmutableList(new Array(pollMinOptions).fill('')),
|
||||
expires_in: 24 * 3600,
|
||||
multiple: false,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue