mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-18 02:07:41 +00:00
LocalMoneroWidget: disable search button during search
This commit is contained in:
parent
e054db66ca
commit
cebe92b61f
2 changed files with 5 additions and 6 deletions
|
@ -19,8 +19,6 @@ LocalMoneroWidget::LocalMoneroWidget(QWidget *parent, QSharedPointer<AppContext>
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
// this->adjustSize();
|
|
||||||
|
|
||||||
QPixmap logo(":/assets/images/localMonero_logo.png");
|
QPixmap logo(":/assets/images/localMonero_logo.png");
|
||||||
ui->logo->setPixmap(logo.scaled(100, 100, Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
ui->logo->setPixmap(logo.scaled(100, 100, Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
||||||
|
|
||||||
|
@ -68,6 +66,7 @@ void LocalMoneroWidget::skinChanged() {
|
||||||
void LocalMoneroWidget::onSearchClicked() {
|
void LocalMoneroWidget::onSearchClicked() {
|
||||||
m_model->clearData();
|
m_model->clearData();
|
||||||
m_currentPage = 0;
|
m_currentPage = 0;
|
||||||
|
ui->btn_search->setEnabled(false);
|
||||||
|
|
||||||
this->searchOffers();
|
this->searchOffers();
|
||||||
}
|
}
|
||||||
|
@ -78,7 +77,7 @@ void LocalMoneroWidget::onSignUpClicked() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalMoneroWidget::onApiResponse(const LocalMoneroApi::LocalMoneroResponse &resp) {
|
void LocalMoneroWidget::onApiResponse(const LocalMoneroApi::LocalMoneroResponse &resp) {
|
||||||
qDebug() << "We got a response";
|
ui->btn_search->setEnabled(true);
|
||||||
|
|
||||||
if (!resp.ok) {
|
if (!resp.ok) {
|
||||||
QMessageBox::warning(this, "LocalMonero error", QString("Request failed:\n\n%1").arg(resp.message));
|
QMessageBox::warning(this, "LocalMonero error", QString("Request failed:\n\n%1").arg(resp.message));
|
||||||
|
|
|
@ -41,11 +41,11 @@ private:
|
||||||
void viewOfferDetails();
|
void viewOfferDetails();
|
||||||
void updatePaymentMethods();
|
void updatePaymentMethods();
|
||||||
|
|
||||||
|
Ui::LocalMoneroWidget *ui;
|
||||||
|
QSharedPointer<AppContext> m_ctx;
|
||||||
|
|
||||||
int m_currentPage = 0;
|
int m_currentPage = 0;
|
||||||
|
|
||||||
Ui::LocalMoneroWidget *ui;
|
|
||||||
|
|
||||||
QSharedPointer<AppContext> m_ctx;
|
|
||||||
LocalMoneroApi *m_api;
|
LocalMoneroApi *m_api;
|
||||||
LocalMoneroModel *m_model;
|
LocalMoneroModel *m_model;
|
||||||
UtilsNetworking *m_network;
|
UtilsNetworking *m_network;
|
||||||
|
|
Loading…
Reference in a new issue