Clean up connection code

This commit is contained in:
Aditya Kulkarni
2018-11-07 15:50:35 -08:00
parent 2b9cc055bf
commit 0f603f0d0f
5 changed files with 67 additions and 52 deletions

View File

@@ -8,6 +8,8 @@ using json = nlohmann::json;
RPC::RPC(MainWindow* main) {
auto cl = new ConnectionLoader(main, this);
// Show a default no connection message until we can connect.
cl->loadConnection();
this->main = main;
@@ -72,6 +74,8 @@ void RPC::setConnection(Connection* c) {
delete conn;
this->conn = c;
ui->statusBar->showMessage("Ready!");
refreshZECPrice();
refresh();
}
@@ -495,6 +499,7 @@ void RPC::getInfoThenRefresh(bool force) {
ui->solrate->setText(QString::number(solrate) % " Sol/s");
});
} else {
qDebug() << "removing tab!";
ui->tabWidget->removeTab(4);
}