|
|
|
@ -9,7 +9,6 @@ import android.graphics.Canvas;
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
|
import androidx.recyclerview.widget.ItemTouchHelper;
|
|
|
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
|
|
|
import com.todoroo.astrid.adapter.CaldavTaskAdapter;
|
|
|
|
|
import com.todoroo.astrid.adapter.TaskAdapter;
|
|
|
|
|
import com.todoroo.astrid.utility.Flags;
|
|
|
|
|
import org.tasks.data.TaskContainer;
|
|
|
|
@ -141,17 +140,13 @@ public class ItemTouchHelperCallback extends ItemTouchHelper.Callback {
|
|
|
|
|
if (from < to) {
|
|
|
|
|
to++;
|
|
|
|
|
}
|
|
|
|
|
if (!(adapter instanceof CaldavTaskAdapter)) {
|
|
|
|
|
vh.task.setIndent(targetIndent);
|
|
|
|
|
vh.setIndent(targetIndent);
|
|
|
|
|
}
|
|
|
|
|
recyclerAdapter.moved(from, to, targetIndent);
|
|
|
|
|
} else if (task.getIndent() != targetIndent) {
|
|
|
|
|
int position = vh.getAdapterPosition();
|
|
|
|
|
if (!(adapter instanceof CaldavTaskAdapter)) {
|
|
|
|
|
vh.task.setIndent(targetIndent);
|
|
|
|
|
vh.setIndent(targetIndent);
|
|
|
|
|
}
|
|
|
|
|
recyclerAdapter.moved(position, position, targetIndent);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|