-void ChatView::setContents(const QList<AbstractUiMsg *> &list) {
- //qDebug() << "setting" << list.count();
- //appendChatLines(list);
+void ChatView::verticalScrollbarChanged(int newPos) {
+ Q_UNUSED(newPos);
+ if(!scene()->isBacklogFetchingEnabled()) return;
+
+ QAbstractSlider *vbar = verticalScrollBar();
+ if(!vbar)
+ return;
+ if(vbar->isSliderDown()) {
+ /*
+ int relativePos = 100;
+ if(vbar->maximum() - vbar->minimum() != 0)
+ relativePos = (newPos - vbar->minimum()) * 100 / (vbar->maximum() - vbar->minimum());
+ scene()->setIsFetchingBacklog(relativePos < 20);
+ */
+ scene()->setIsFetchingBacklog(vbar->value() == vbar->minimum());
+ }