diff --git a/callwidget.cpp b/callwidget.cpp
index ebc52d2e7276afc9efec434cb89d192f96d5463d..34e23705d1d0eb0ceeb0fcc34b1644cb6ac4e270 100644
--- a/callwidget.cpp
+++ b/callwidget.cpp
@@ -92,9 +92,13 @@ CallWidget::CallWidget(QWidget *parent) :
         ui->historyList->setHeaderHidden(true);
         historyDelegate_ = new HistoryDelegate();
         ui->historyList->setItemDelegate(historyDelegate_);
-        auto idx = CategorizedHistoryModel::SortedProxy::instance()->model()->index(0,0);
-        if (idx.isValid())
-            ui->historyList->setExpanded(idx, true);
+
+        connect(CategorizedHistoryModel::SortedProxy::instance()->model(), &QSortFilterProxyModel::layoutChanged, [=]() {
+            auto idx = CategorizedHistoryModel::SortedProxy::instance()->model()->index(0,0);
+            if (idx.isValid())
+                ui->historyList->setExpanded(idx, true);
+        });
+
 
         ui->sortComboBox->setModel(CategorizedHistoryModel::SortedProxy::instance()->categoryModel());