@@ -476,7 +476,7 @@ void ListViewWithPageHeader::viewportMoved(Qt::Orientations orient)
476 qreal diff = m_previousContentY - contentY();
476 qreal diff = m_previousContentY - contentY();
477 const bool showHeaderAnimationRunning = m_contentYAnimation->isRunning() && contentYAnimationType == ContentYAnimationShowHeader;
477 const bool showHeaderAnimationRunning = m_contentYAnimation->isRunning() && contentYAnimationType == ContentYAnimationShowHeader;
478 if (m_headerItem) {
478 if (m_headerItem) {
479− auto oldHeaderItemShownHeight = m_headerItemShownHeight;
479+ const auto oldHeaderItemShownHeight = m_headerItemShownHeight;
480 if (contentY() < -m_minYExtent) {
480 if (contentY() < -m_minYExtent) {
481 // Stick the header item to the top when dragging down
481 // Stick the header item to the top when dragging down
482 m_headerItem->setY(contentY());
482 m_headerItem->setY(contentY());
@@ -980,7 +980,6 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
980 if (growUp) {
980 if (growUp) {
981 ListItem *firstItem = m_visibleItems.first();
981 ListItem *firstItem = m_visibleItems.first();
982 firstItem->setY(firstItem->y() - item->height());
982 firstItem->setY(firstItem->y() - item->height());
985 // Adding an item may break a "same section" chain, so check
984 // Adding an item may break a "same section" chain, so check
986 // if we need adding a new section item
985 // if we need adding a new section item
@@ -991,7 +990,6 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
991 if (growUp && nextItem->m_sectionItem) {
990 if (growUp && nextItem->m_sectionItem) {
992 ListItem *firstItem = m_visibleItems.first();
991 ListItem *firstItem = m_visibleItems.first();
993 firstItem->setY(firstItem->y() - nextItem->m_sectionItem->height());
992 firstItem->setY(firstItem->y() - nextItem->m_sectionItem->height());
@@ -1000,6 +998,7 @@ void ListViewWithPageHeader::onModelUpdated(const QQmlChangeSet &changeSet, bool
1000 ListItem *firstItem = m_visibleItems.first();
998 ListItem *firstItem = m_visibleItems.first();
1001 firstItem->setY(oldFirstValidIndexPos);
999 firstItem->setY(oldFirstValidIndexPos);
1001+ adjustMinYExtent();
1003 } else if (insert.index <= m_firstVisibleIndex) {
1002 } else if (insert.index <= m_firstVisibleIndex) {
1004 m_firstVisibleIndex += insert.count;
1003 m_firstVisibleIndex += insert.count;