Closed iamsad3508 closed 1 year ago
Umm do not double click? 😭
🤣 it's ok to me, if you won't fix it
And what is the fault for that double click operation?
Is anyone working on this issue?
Not as far as I'm concerned. Feel free to submit a PR.
Can you assign it to me?
@Mygod There are a couple of optimizations we can do in the move function of ProfileAdapter.
1) I think instead of swapping each item in the [from, to] range, we can just swap [from, to] object's userOrder
and [from, to] objects themselves in the array.
2) Instead of updated
HashSet of Profile object, we can use HashMap of <profileId, Profile> to reduce the number of update operations on DB.
For example, I dragged the item at index 20
to index 0
and back to index 20
, which added 53 objects in the updated
HashSet, where we only need to update at most 20.
@Mygod There are a couple of optimizations we can do in the move function of ProfileAdapter.
- I think instead of swapping each item in the [from, to] range, we can just swap [from, to] object's
userOrder
and [from, to] objects themselves in the array.- Instead of
updated
HashSet of Profile object, we can use HashMap of <profileId, Profile> to reduce the number of update operations on DB. For example, I dragged the item at index20
to index0
and back to index20
, which added 53 objects in theupdated
HashSet, where we only need to update at most 20.
@Mygod Should I implement above optimization ?
Please read contributing guidelines. Thanks.
Describe the bug select one profile, and double click the profile and drag upwards, profiles would be displayed incorrectly
To Reproduce Steps to reproduce the behavior: 1.select one profile 2.double click the profile fast 3.don't let go your finger and draw it upwards immediately
Expected behavior normal
Screenshots
Smartphone (please complete the following information):
Configuration Put an
x
inside the [ ] that applies.Additional context Add any other context about the problem here.