mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-17 20:08:28 +00:00
Merge branch 'fix/ui' into 'release/6.1'
Defer ChatProxy::invalidate() to avoid accessibility crash on macOS (QTBUG-95764) See merge request BC/public/linphone-desktop!1809
This commit is contained in:
commit
0c269b7ae5
2 changed files with 11 additions and 1 deletions
|
|
@ -125,6 +125,13 @@ void ChatList::setSelf(QSharedPointer<ChatList> me) {
|
||||||
}
|
}
|
||||||
auto linphoneChatRooms = currentAccount->filterChatRooms(Utils::appStringToCoreString(mFilter));
|
auto linphoneChatRooms = currentAccount->filterChatRooms(Utils::appStringToCoreString(mFilter));
|
||||||
for (auto it : linphoneChatRooms) {
|
for (auto it : linphoneChatRooms) {
|
||||||
|
auto state = it->getState();
|
||||||
|
if (state == linphone::ChatRoom::State::CreationFailed ||
|
||||||
|
state == linphone::ChatRoom::State::CreationPending ||
|
||||||
|
state == linphone::ChatRoom::State::TerminationPending ||
|
||||||
|
state == linphone::ChatRoom::State::Instantiated) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
auto model = createChatCore(it);
|
auto model = createChatCore(it);
|
||||||
chats->push_back(model);
|
chats->push_back(model);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@
|
||||||
#include "ChatList.hpp"
|
#include "ChatList.hpp"
|
||||||
#include "core/App.hpp"
|
#include "core/App.hpp"
|
||||||
|
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
DEFINE_ABSTRACT_OBJECT(ChatProxy)
|
DEFINE_ABSTRACT_OBJECT(ChatProxy)
|
||||||
|
|
||||||
ChatProxy::ChatProxy(QObject *parent) {
|
ChatProxy::ChatProxy(QObject *parent) {
|
||||||
|
|
@ -50,7 +52,8 @@ void ChatProxy::setSourceModel(QAbstractItemModel *model) {
|
||||||
emit chatAdded(new ChatGui(chatCore));
|
emit chatAdded(new ChatGui(chatCore));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(newChatList, &ChatList::dataChanged, this, [this] { invalidate(); });
|
connect(newChatList, &ChatList::dataChanged, this,
|
||||||
|
[this] { QTimer::singleShot(0, this, [this] { invalidate(); }); });
|
||||||
newChatList->lUpdate();
|
newChatList->lUpdate();
|
||||||
}
|
}
|
||||||
QSortFilterProxyModel::setSourceModel(newChatList);
|
QSortFilterProxyModel::setSourceModel(newChatList);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue