[GUI] Fix object update notification handling
This commit is contained in:
parent
f72f07b05b
commit
ce84de41be
2 changed files with 9 additions and 3 deletions
|
|
@ -151,7 +151,7 @@ namespace graphene { namespace app {
|
|||
*
|
||||
*/
|
||||
std::map<string,full_account> get_full_accounts(std::function<void(const variant&)> callback,
|
||||
const vector<string>& names_or_ids);
|
||||
const vector<string>& names_or_ids);
|
||||
|
||||
/**
|
||||
* Stop receiving updates generated by get_full_accounts()
|
||||
|
|
|
|||
|
|
@ -141,7 +141,13 @@ void ChainDataModel::getAccountImpl(QString accountIdentifier, Account* const *
|
|||
try {
|
||||
ilog("Fetching account ${acct}", ("acct", accountIdentifier.toStdString()));
|
||||
auto result = m_db_api->get_full_accounts([this](const fc::variant& v) {
|
||||
processUpdatedObject(v);
|
||||
vector<variant> updates = v.as<vector<variant>>();
|
||||
for (const variant& update : updates) {
|
||||
if (update.is_object())
|
||||
processUpdatedObject(update);
|
||||
else
|
||||
elog("Handling object deletions is not yet implemented: ${update}", ("update", update));
|
||||
}
|
||||
}, {accountIdentifier.toStdString()});
|
||||
fc::optional<full_account> accountPackage;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue