Skip to content

Commit

Permalink
[ui][history] Fix behaviour of check boxes in filters of history page
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricio1802 committed Jan 29, 2020
1 parent 8c269d1 commit 2fa4777
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 0 additions & 2 deletions src/models/history/historyManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ func (hm *HistoryManager) addFilter(addr string) {
if !alreadyIs {
hm.filters = append(hm.filters, addr)
}

}

func (hm *HistoryManager) removeFilter(addr string) {
Expand All @@ -298,7 +297,6 @@ func (hm *HistoryManager) removeFilter(addr string) {
break
}
}

}
func (hm *HistoryManager) getAddressesWithWallets() map[string]string {
logHistoryManager.Info("Get Addresses with wallets")
Expand Down
21 changes: 13 additions & 8 deletions src/ui/Delegates/HistoryFilterListDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,7 @@ Item {
}
}

onAllCheckedChanged: {
if (listViewFilterAddress.allChecked) {
listViewFilterAddress.listAddresses.editAddress(index, address, sky, coinHours, 1)
} else {
listViewFilterAddress.listAddresses.editAddress(index, address, sky, coinHours, 0)
}
}


Component.onCompleted: {
modelManager.setWalletManager(walletManager)
Expand All @@ -102,7 +96,18 @@ Item {
checked: marked
width: parent.width
text: address

Connections{
target: listViewFilterAddress
onAllCheckedChanged: {
if (listViewFilterAddress.allChecked) {
historyManager.addFilter(address)
} else {
historyManager.removeFilter(address)
}
walletManager.editMarkAddress(address, listViewFilterAddress.allChecked)
listViewFilterAddress.listAddresses.editAddress(index, address, sky, coinHours, listViewFilterAddress.allChecked)
}
}
onCheckedChanged: {
ListView.view.checkedDelegates += checked ? 1: -1

Expand Down

0 comments on commit 2fa4777

Please sign in to comment.