diff --git a/src/libwalletqt/SubaddressAccount.cpp b/src/libwalletqt/SubaddressAccount.cpp index 47cd6410..1d83fcbd 100644 --- a/src/libwalletqt/SubaddressAccount.cpp +++ b/src/libwalletqt/SubaddressAccount.cpp @@ -36,19 +36,15 @@ SubaddressAccount::SubaddressAccount(Monero::SubaddressAccount *subaddressAccoun getAll(); } -QList SubaddressAccount::getAll(bool update) const +QList SubaddressAccount::getAll() const { qDebug(__FUNCTION__); emit refreshStarted(); - if(update) - m_rows.clear(); - - if (m_rows.empty()){ - for (auto &row: m_subaddressAccountImpl->getAll()) { - m_rows.append(row); - } + m_rows.clear(); + for (auto &row: m_subaddressAccountImpl->getAll()) { + m_rows.append(row); } emit refreshFinished(); @@ -63,19 +59,19 @@ Monero::SubaddressAccountRow * SubaddressAccount::getRow(int index) const void SubaddressAccount::addRow(const QString &label) const { m_subaddressAccountImpl->addRow(label.toStdString()); - getAll(true); + getAll(); } void SubaddressAccount::setLabel(quint32 accountIndex, const QString &label) const { m_subaddressAccountImpl->setLabel(accountIndex, label.toStdString()); - getAll(true); + getAll(); } void SubaddressAccount::refresh() const { m_subaddressAccountImpl->refresh(); - getAll(true); + getAll(); } quint64 SubaddressAccount::count() const diff --git a/src/libwalletqt/SubaddressAccount.h b/src/libwalletqt/SubaddressAccount.h index c7a6794d..b7979156 100644 --- a/src/libwalletqt/SubaddressAccount.h +++ b/src/libwalletqt/SubaddressAccount.h @@ -38,7 +38,7 @@ class SubaddressAccount : public QObject { Q_OBJECT public: - Q_INVOKABLE QList getAll(bool update = false) const; + Q_INVOKABLE QList getAll() const; Q_INVOKABLE Monero::SubaddressAccountRow * getRow(int index) const; Q_INVOKABLE void addRow(const QString &label) const; Q_INVOKABLE void setLabel(quint32 accountIndex, const QString &label) const; diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 7b122481..5f376ff8 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -438,7 +438,7 @@ bool Wallet::refresh() bool result = m_walletImpl->refresh(); m_history->refresh(currentSubaddressAccount()); m_subaddress->refresh(currentSubaddressAccount()); - m_subaddressAccount->getAll(true); + m_subaddressAccount->getAll(); if (result) emit updated(); return result;