Skip to content
Snippets Groups Projects
Commit fb420b2f authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

addmemberpanel: simplify and avoid extra model resets

Change-Id: I3989f386127c55c224311afc0aa0b89303579dec
parent 8a7547aa
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment