Commit 3a68ad1f authored by Martin Straka's avatar Martin Straka

Update message counters after zfo import.

parent 47836391
......@@ -49,7 +49,7 @@ Component {
}
Component.onDestruction: {
//accounts.updateAccountCounters(accountModel)
accounts.updateAccountCounters(accountModel)
statusBar.visible = false
}
......
/*
* Copyright (C) 2014-2017 CZ.NIC
* Copyright (C) 2014-2018 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -47,6 +47,21 @@ bool Accounts::boxEffectiveOVM(const QString &userName)
return globAccountDbPtr->boxEffectiveOVM(userName);
}
void Accounts::updateAccountCounters(const QVariant &acntModelVariant)
{
qDebug("%s()", __func__);
AccountListModel *accountModel =
AccountListModel::fromVariant(acntModelVariant);
if (accountModel == Q_NULLPTR) {
Q_ASSERT(0);
qCritical("%s", "Cannot access account model.");
return;
}
loadModelCounters(accountModel);
}
void Accounts::updateNewMessageCounter(const QVariant &acntModelVariant,
const QString &userName)
{
......
/*
* Copyright (C) 2014-2017 CZ.NIC
* Copyright (C) 2014-2018 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -56,6 +56,14 @@ public:
Q_INVOKABLE static
bool boxEffectiveOVM(const QString &userName);
/*!
* @brief Update message counters in account list.
*
* @param[in] accountModel Model whose counters should be updated.
*/
Q_INVOKABLE static
void updateAccountCounters(const QVariant &acntModelVariant);
/*!
* @brief Update new message counter.
*
......
/*
* Copyright (C) 2014-2017 CZ.NIC
* Copyright (C) 2014-2018 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* Copyright (C) 2014-2017 CZ.NIC
* Copyright (C) 2014-2018 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* Copyright (C) 2014-2017 CZ.NIC
* Copyright (C) 2014-2018 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* Copyright (C) 2014-2017 CZ.NIC
* Copyright (C) 2014-2018 CZ.NIC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment