aic-mobile-android icon indicating copy to clipboard operation
aic-mobile-android copied to clipboard

Search: Fixes the spacing issue between suggested artworks (AIC-633)

Open sam33rdhakal opened this issue 5 years ago • 0 comments

The cause behind this issue was the logic we used to get column number for suggested artworks. That logic was based on the position of the on the map cell.

val columnValue = (currentPosition - onTheMapPosition) % maxSize

This logic can go wrong when suggested artwork cells are recycled before that on the map cell. So the proposed solution is to not use on the map cell at all. Now I pass the order of the cells when they are constructed and then use it to calculate the column index.

val columnValue = viewModel.order % maxSize

sam33rdhakal avatar Nov 20 '18 21:11 sam33rdhakal