aic-mobile-android
aic-mobile-android copied to clipboard
Search: Fixes the spacing issue between suggested artworks (AIC-633)
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