Fix update force logic
This commit is contained in:
@@ -137,7 +137,7 @@ void Controller::refresh(bool force) {
|
|||||||
getInfoThenRefresh(force);
|
getInfoThenRefresh(force);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Controller::getInfoThenRefresh(bool doUpdate) {
|
void Controller::getInfoThenRefresh(bool force) {
|
||||||
if (!zrpc->haveConnection())
|
if (!zrpc->haveConnection())
|
||||||
return noConnection();
|
return noConnection();
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ void Controller::getInfoThenRefresh(bool doUpdate) {
|
|||||||
main->disableRecurring();
|
main->disableRecurring();
|
||||||
|
|
||||||
int curBlock = reply["latest_block_height"].get<json::number_integer_t>();
|
int curBlock = reply["latest_block_height"].get<json::number_integer_t>();
|
||||||
bool doUpdate = doUpdate || (model->getLatestBlock() != curBlock);
|
bool doUpdate = force || (model->getLatestBlock() != curBlock);
|
||||||
model->setLatestBlock(curBlock);
|
model->setLatestBlock(curBlock);
|
||||||
|
|
||||||
qDebug() << "Refreshing. Full update: " << doUpdate;
|
qDebug() << "Refreshing. Full update: " << doUpdate;
|
||||||
|
|||||||
Reference in New Issue
Block a user