Bring back dynamic backlog fetching (move scrollbar slider to the very top to get...
[quassel.git] / src / qtui / bufferwidget.cpp
index d534b3d..c1e992d 100644 (file)
@@ -19,8 +19,7 @@
  ***************************************************************************/
 
 #include "bufferwidget.h"
-#include "chatline-old.h"
-#include "chatwidget.h"
+#include "chatview.h"
 #include "settings.h"
 #include "client.h"
 
@@ -35,11 +34,13 @@ BufferWidget::~BufferWidget() {
 }
 
 AbstractChatView *BufferWidget::createChatView(BufferId id) {
-  QWidget *chatView = new ChatWidget(id, this);
+  ChatView *chatView;
+  chatView = new ChatView(Client::buffer(id), this);
   _chatViews[id] = chatView;
   ui.stackedWidget->addWidget(chatView);
   chatView->setFocusProxy(this);
-  return dynamic_cast<AbstractChatView*>(chatView);
+  chatView->setBufferForBacklogFetching(id);
+  return chatView;
 }
 
 void BufferWidget::removeChatView(BufferId id) {