fix(wallet) refresh recipients in menu for activity filter
Closes #13663
This commit is contained in:
parent
b4aff67639
commit
42d3c1b42b
|
@ -192,11 +192,17 @@ Column {
|
|||
|
||||
Repeater {
|
||||
model: activityFilterStore.recentsFilters
|
||||
delegate: ActivityFilterTagItem {
|
||||
|
||||
// Use lazy loading as a workaround to refresh the list when the model is updated
|
||||
// to force an address lookup to all delegates
|
||||
delegate: Loader {
|
||||
active: parent.visible
|
||||
sourceComponent: ActivityFilterTagItem {
|
||||
tagPrimaryLabel.text: root.store.getNameForAddress(modelData) || StatusQUtils.Utils.elideText(modelData,6,4)
|
||||
onClosed: activityFilterStore.toggleRecents(modelData)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: activityFilterStore.savedAddressFilters
|
||||
|
|
|
@ -111,18 +111,29 @@ StatusMenu {
|
|||
StatusBaseText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("No Recents")
|
||||
visible: recipientsListView.count === 0 && !root.loadingRecipients
|
||||
visible: !!recipientsLoader.item && recipientsLoader.item.count === 0 && !root.loadingRecipients
|
||||
}
|
||||
StatusBaseText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Loading Recents")
|
||||
visible: root.loadingRecipients
|
||||
}
|
||||
StatusListView {
|
||||
id: recipientsListView
|
||||
visible: !root.loadingRecipients
|
||||
|
||||
// Use lazy loading as a workaround to refresh the list when the model is updated
|
||||
// to force an address lookup to all delegates
|
||||
Loader {
|
||||
id: recipientsLoader
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
active: parent.visible && !root.loadingRecipients
|
||||
sourceComponent: recipientsComponent
|
||||
}
|
||||
|
||||
Component {
|
||||
id: recipientsComponent
|
||||
|
||||
StatusListView {
|
||||
visible: true
|
||||
model: SortFilterProxyModel {
|
||||
sourceModel: root.recentsList
|
||||
filters: ExpressionFilter {
|
||||
|
@ -160,6 +171,7 @@ StatusMenu {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: column2
|
||||
|
|
Loading…
Reference in New Issue