I've renamed the function as every existing offer should have sort info now. That is why I think is better to just directly check if isActive or if there is prev or next value.
On the other hand I understand that just checking isActive is enough for the _unsort function. However for _sort function we actually need to see if there is sort info. The main purpose of having a delb value instead of just removing the data is to avoid a new created offer that is using as position a recently cancelled offer to start from scratch.
I've renamed the function as every existing offer should have sort info now. That is why I think is better to just directly check if
isActive
or if there isprev
ornext
value.On the other hand I understand that just checking
isActive
is enough for the_unsort
function. However for_sort
function we actually need to see if there is sort info. The main purpose of having adelb
value instead of just removing the data is to avoid a new created offer that is using as position a recently cancelled offer to start from scratch.