From 0b86b204209d78f496721ac14ed33691d2c5db1e Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Wed, 17 Jun 2020 10:22:08 +0200 Subject: Makes cancelling gemini requests more robust. --- src/browsertab.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/browsertab.cpp') diff --git a/src/browsertab.cpp b/src/browsertab.cpp index 09bb56c..359fd7c 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -570,8 +570,10 @@ void BrowserTab::updateUI() this->ui->back_button->setEnabled(history.oneBackward(current_history_index).isValid()); this->ui->forward_button->setEnabled(history.oneForward(current_history_index).isValid()); - this->ui->refresh_button->setVisible(this->successfully_loaded); - this->ui->stop_button->setVisible(not this->successfully_loaded); + bool in_progress = (this->current_handler != nullptr) and this->current_handler->isInProgress(); + + this->ui->refresh_button->setVisible(not in_progress); + this->ui->stop_button->setVisible(in_progress); this->ui->fav_button->setEnabled(this->successfully_loaded); this->ui->fav_button->setChecked(global_favourites.contains(this->current_location)); -- cgit v1.2.3