From 96ea7278d8c780f6ec1b6a61a1120123269aecf9 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Tue, 28 Apr 2020 22:16:29 +0200 Subject: [PATCH] refresh contactlist on HushChat tab --- src/contactmodel.cpp | 5 +++++ src/mainwindow.ui | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/contactmodel.cpp b/src/contactmodel.cpp index ad6a8fb..3423be1 100644 --- a/src/contactmodel.cpp +++ b/src/contactmodel.cpp @@ -3,8 +3,13 @@ void ContactModel::renderContactList(QListWidget* view) { + while(view->count() > 0) + { + view->takeItem(0); + } for(auto &c : AddressBook::getInstance()->getAllAddressLabels()) { view->addItem(c.getName()); + } } \ No newline at end of file diff --git a/src/mainwindow.ui b/src/mainwindow.ui index f08d9be..02c074c 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -1388,6 +1388,14 @@ + + + 1180 + 460 + 47 + 17 + + 0 / 512