mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
Implement renumeration of ordered tags upon collision
I was being bitten by this enough for me to want to fix it. This implementation really ought to be improved such that it doesnt tend towards being broken the more it is used.
This commit is contained in:
parent
e80c4fadea
commit
b0d115a64a
@ -360,7 +360,13 @@ var RoomSubList = React.createClass({
|
||||
|
||||
if (order === orderA || order === orderB) {
|
||||
console.error("Cannot describe new list position. This should be incredibly unlikely.");
|
||||
// TODO: renumber the list
|
||||
this.state.sortedList.forEach((room, index) => {
|
||||
MatrixClientPeg.get().setRoomTag(
|
||||
room.roomId, this.props.tagName,
|
||||
{order: index / this.state.sortedList.length},
|
||||
);
|
||||
});
|
||||
return index / this.state.sortedList.length;
|
||||
}
|
||||
|
||||
return order;
|
||||
|
Loading…
Reference in New Issue
Block a user