1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-03 22:35:45 +02:00

addmemberpanel: simplify and avoid extra model resets

Change-Id: I3989f386127c55c224311afc0aa0b89303579dec
This commit is contained in:
Kateryna Kostiuk 2023-06-21 17:03:42 -04:00
parent 8a7547aaba
commit fb420b2ff7

View file

@ -57,20 +57,8 @@ Rectangle {
Layout.leftMargin: 4
Layout.rightMargin: 4
model: ContactAdapter.getContactSelectableModel(type)
Connections {
target: CurrentConversationMembers
function onCountChanged() {
contactPickerListView.model = ContactAdapter.getContactSelectableModel(type);
}
}
onVisibleChanged: {
if (visible)
model = ContactAdapter.getContactSelectableModel(type);
}
// Reset the model if visible or the CurrentConversationMembers.count changes (0 or greater)
model: visible && CurrentConversationMembers.count >= 0 ? ContactAdapter.getContactSelectableModel(type) : null
delegate: ContactPickerItemDelegate {
id: contactPickerItemDelegate