Coins: fix filter

This commit is contained in:
tobtoht 2021-07-02 17:52:03 +02:00
parent e4531a9e30
commit a49a31ad86
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -28,11 +28,15 @@ bool CoinsProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceP
{
CoinsInfo* coin = m_coins->coin(sourceRow);
if (!m_showSpent && coin->spent()) {
return false;
}
if (!m_searchRegExp.pattern().isEmpty()) {
return coin->pubKey().contains(m_searchRegExp) || coin->address().contains(m_searchRegExp)
|| coin->hash().contains(m_searchRegExp) || coin->addressLabel().contains(m_searchRegExp)
|| coin->description().contains(m_searchRegExp);
}
return !(!m_showSpent && coin->spent()) && coin->subaddrAccount() == 0;
return true;
}