diff src/gui/dialog/settings/services.cc @ 319:d928ec7b6a0d

services/kitsu: implement GetAnimeList() it finally works!
author Paper <paper@paper.us.eu.org>
date Wed, 12 Jun 2024 17:52:26 -0400
parents b1f4d1867ab1
children
line wrap: on
line diff
--- a/src/gui/dialog/settings/services.cc	Wed Jun 12 05:25:41 2024 -0400
+++ b/src/gui/dialog/settings/services.cc	Wed Jun 12 17:52:26 2024 -0400
@@ -93,8 +93,11 @@
 
 			{
 				QPushButton* auth_button = new QPushButton(credentials_grid);
-				connect(auth_button, &QPushButton::clicked, this, [email, password] {
-					Services::Kitsu::AuthorizeUser(Strings::ToUtf8String(email->text()), Strings::ToUtf8String(password->text()));
+				connect(auth_button, &QPushButton::clicked, this, [auth_button, email, password] {
+					if (Services::Kitsu::AuthorizeUser(Strings::ToUtf8String(email->text()), Strings::ToUtf8String(password->text())))
+						auth_button->setText(tr("Re-authorize..."));
+					else
+						auth_button->setText(tr("Authorize..."));
 				});
 				auth_button->setText(session.config.auth.kitsu.access_token.empty() ? tr("Authorize...")
 				                                                                    : tr("Re-authorize..."));