mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
Use consistent indentation and break;s in TagOrderStore switch
This commit is contained in:
parent
a120335130
commit
3e532e3722
1 changed files with 4 additions and 3 deletions
|
@ -65,13 +65,14 @@ class TagOrderStore extends Store {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Initialise the state such that if account data is unset, default to joined groups
|
// Initialise the state such that if account data is unset, default to joined groups
|
||||||
case 'GroupActions.fetchJoinedGroups.success':
|
case 'GroupActions.fetchJoinedGroups.success': {
|
||||||
this._setState({
|
this._setState({
|
||||||
joinedGroupIds: payload.result.groups.sort(), // Sort lexically
|
joinedGroupIds: payload.result.groups.sort(), // Sort lexically
|
||||||
hasFetchedJoinedGroups: true,
|
hasFetchedJoinedGroups: true,
|
||||||
});
|
});
|
||||||
this._updateOrderedTags();
|
this._updateOrderedTags();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
// Puts payload.tag at payload.targetTag, placing the targetTag before or after the tag
|
// Puts payload.tag at payload.targetTag, placing the targetTag before or after the tag
|
||||||
case 'order_tag': {
|
case 'order_tag': {
|
||||||
if (!this._state.orderedTags ||
|
if (!this._state.orderedTags ||
|
||||||
|
@ -90,10 +91,10 @@ class TagOrderStore extends Store {
|
||||||
...orderedTags.slice(newIndex),
|
...orderedTags.slice(newIndex),
|
||||||
];
|
];
|
||||||
this._setState({orderedTags});
|
this._setState({orderedTags});
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_updateOrderedTags() {
|
_updateOrderedTags() {
|
||||||
this._setState({
|
this._setState({
|
||||||
|
|
Loading…
Reference in a new issue