mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 20:02:04 +02:00
SubaddressAccount: drop useless getAll 'update' default argument
This commit is contained in:
parent
46227bdad0
commit
c9900c05b2
@ -36,19 +36,15 @@ SubaddressAccount::SubaddressAccount(Monero::SubaddressAccount *subaddressAccoun
|
|||||||
getAll();
|
getAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<Monero::SubaddressAccountRow*> SubaddressAccount::getAll(bool update) const
|
QList<Monero::SubaddressAccountRow *> SubaddressAccount::getAll() const
|
||||||
{
|
{
|
||||||
qDebug(__FUNCTION__);
|
qDebug(__FUNCTION__);
|
||||||
|
|
||||||
emit refreshStarted();
|
emit refreshStarted();
|
||||||
|
|
||||||
if(update)
|
m_rows.clear();
|
||||||
m_rows.clear();
|
for (auto &row: m_subaddressAccountImpl->getAll()) {
|
||||||
|
m_rows.append(row);
|
||||||
if (m_rows.empty()){
|
|
||||||
for (auto &row: m_subaddressAccountImpl->getAll()) {
|
|
||||||
m_rows.append(row);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
emit refreshFinished();
|
emit refreshFinished();
|
||||||
@ -63,19 +59,19 @@ Monero::SubaddressAccountRow * SubaddressAccount::getRow(int index) const
|
|||||||
void SubaddressAccount::addRow(const QString &label) const
|
void SubaddressAccount::addRow(const QString &label) const
|
||||||
{
|
{
|
||||||
m_subaddressAccountImpl->addRow(label.toStdString());
|
m_subaddressAccountImpl->addRow(label.toStdString());
|
||||||
getAll(true);
|
getAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubaddressAccount::setLabel(quint32 accountIndex, const QString &label) const
|
void SubaddressAccount::setLabel(quint32 accountIndex, const QString &label) const
|
||||||
{
|
{
|
||||||
m_subaddressAccountImpl->setLabel(accountIndex, label.toStdString());
|
m_subaddressAccountImpl->setLabel(accountIndex, label.toStdString());
|
||||||
getAll(true);
|
getAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubaddressAccount::refresh() const
|
void SubaddressAccount::refresh() const
|
||||||
{
|
{
|
||||||
m_subaddressAccountImpl->refresh();
|
m_subaddressAccountImpl->refresh();
|
||||||
getAll(true);
|
getAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
quint64 SubaddressAccount::count() const
|
quint64 SubaddressAccount::count() const
|
||||||
|
@ -38,7 +38,7 @@ class SubaddressAccount : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
Q_INVOKABLE QList<Monero::SubaddressAccountRow*> getAll(bool update = false) const;
|
Q_INVOKABLE QList<Monero::SubaddressAccountRow *> getAll() const;
|
||||||
Q_INVOKABLE Monero::SubaddressAccountRow * getRow(int index) const;
|
Q_INVOKABLE Monero::SubaddressAccountRow * getRow(int index) const;
|
||||||
Q_INVOKABLE void addRow(const QString &label) const;
|
Q_INVOKABLE void addRow(const QString &label) const;
|
||||||
Q_INVOKABLE void setLabel(quint32 accountIndex, const QString &label) const;
|
Q_INVOKABLE void setLabel(quint32 accountIndex, const QString &label) const;
|
||||||
|
@ -438,7 +438,7 @@ bool Wallet::refresh()
|
|||||||
bool result = m_walletImpl->refresh();
|
bool result = m_walletImpl->refresh();
|
||||||
m_history->refresh(currentSubaddressAccount());
|
m_history->refresh(currentSubaddressAccount());
|
||||||
m_subaddress->refresh(currentSubaddressAccount());
|
m_subaddress->refresh(currentSubaddressAccount());
|
||||||
m_subaddressAccount->getAll(true);
|
m_subaddressAccount->getAll();
|
||||||
if (result)
|
if (result)
|
||||||
emit updated();
|
emit updated();
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user