mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 14:55:43 +02:00
addmemberpanel: simplify and avoid extra model resets
Change-Id: I3989f386127c55c224311afc0aa0b89303579dec
This commit is contained in:
parent
8a7547aaba
commit
fb420b2ff7
1 changed files with 2 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue