mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-24 09:18:06 +01:00
[Glitch] Fix being able to add more than 4 hashtags to hashtag column in web UI
Port e54fd73df2
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
887d56aa8a
commit
60021f7edb
1 changed files with 11 additions and 1 deletions
|
@ -40,7 +40,17 @@ class ColumnSettings extends React.PureComponent {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onSelect = mode => value => this.props.onChange(['tags', mode], value);
|
onSelect = mode => value => {
|
||||||
|
const oldValue = this.tags(mode);
|
||||||
|
|
||||||
|
// Prevent changes that add more than 4 tags, but allow removing
|
||||||
|
// tags that were already added before
|
||||||
|
if ((value.length > 4) && !(value < oldValue)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.props.onChange(['tags', mode], value);
|
||||||
|
};
|
||||||
|
|
||||||
onToggle = () => {
|
onToggle = () => {
|
||||||
if (this.state.open && this.hasTags()) {
|
if (this.state.open && this.hasTags()) {
|
||||||
|
|
Loading…
Reference in a new issue