1
0
mirror of https://github.com/go-vikunja/app synced 2024-06-02 18:49:47 +00:00

minor bucket dragging fix

This commit is contained in:
Paul Nettleton 2022-08-02 18:48:51 -05:00
parent c93e92c302
commit 8bef344cd1

View File

@ -266,7 +266,8 @@ class _ListPageState extends State<ListPage> {
await _updateBucket(context, taskState.buckets[0]);
newIndex = 1;
}
if (taskState.buckets[newIndex].position <= taskState.buckets[newIndex - 1].position) {
if (taskState.buckets[newIndex].position <= taskState.buckets[newIndex - 1].position
|| taskState.buckets[newIndex].position >= taskState.buckets[newIndex + 1].position) {
taskState.buckets[newIndex].position = newIndex == taskState.buckets.length - 1
? taskState.buckets[newIndex - 1].position + pow(2.0, 16.0)
: (taskState.buckets[newIndex - 1].position