[app] Fixed scrolling of storage view on SD card insertion
It was producing strange results if contentX was non-zero
This commit is contained in:
parent
4e479a3381
commit
5fb0779519
1 changed files with 5 additions and 3 deletions
|
@ -250,9 +250,11 @@ SilicaFlickable {
|
|||
}
|
||||
|
||||
function scrollToPage(index) {
|
||||
dragScrollAnimation.from = contentX
|
||||
dragScrollAnimation.to = (width + spacing) * index
|
||||
dragScrollAnimation.start()
|
||||
if (currentIndex !== index) {
|
||||
dragScrollAnimation.from = contentX
|
||||
dragScrollAnimation.to = contentX + (width + spacing) * (index - currentIndex)
|
||||
dragScrollAnimation.start()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue