Well, the response was underwhelming... In any case, I sort of solved my issue by using the currentItem/Index way, although when adding the first new item, I do get a strange delay before the animation kicks in. When adding items after that, it works fine.
Chris ---- On Fri, 28 Feb 2014 11:12:02 +0200 chriswilty <chriswi...@zoho.com> wrote ---- Excuse the noobie question, I must be doing something obviously wrong... So hopefully the old hands can help. I have a SilicaListView backed by a ListModel, and a pulley-menu command to add an item to the end of the model via ListModel.append(). After adding, I want to scroll the SilicaListView to the bottom to make the newly added item visible. So I thought using scrollToBottom() would do just that: function addNewItem() { myListModel.append({ "role1": 0, "role2": 0 }); mySilicaListView.scrollToBottom(); } However, the view scrolls to the item above the one I just added, as if the view has not yet updated. Should I be binding the scrollToBottom() call to ListView.onAdd() instead? And if so, should I do that in my function so that it is only bound when first needed, for efficiency reasons? Or am I doing this all wrong, should I be using currentItem and highlightFollowsCurrentItem instead? Many thanks, Chris _______________________________________________ SailfishOS.org Devel mailing list
_______________________________________________ SailfishOS.org Devel mailing list