aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/global/AccountListPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages/global/AccountListPage.cpp')
-rw-r--r--launcher/ui/pages/global/AccountListPage.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/launcher/ui/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp
index 816dce47..d3eb2655 100644
--- a/launcher/ui/pages/global/AccountListPage.cpp
+++ b/launcher/ui/pages/global/AccountListPage.cpp
@@ -170,13 +170,7 @@ void AccountListPage::on_actionRefresh_triggered() {
if (selection.size() > 0) {
QModelIndex selected = selection.first();
MinecraftAccountPtr account = selected.data(AccountList::PointerRole).value<MinecraftAccountPtr>();
- AuthSessionPtr session = std::make_shared<AuthSession>();
- auto task = account->refresh(session);
- if (task) {
- ProgressDialog progDialog(this);
- progDialog.execWithTask(task.get());
- // TODO: respond to results of the task
- }
+ m_accounts->requestRefresh(account->internalId());
}
}
@@ -244,15 +238,9 @@ void AccountListPage::on_actionDeleteSkin_triggered()
return;
QModelIndex selected = selection.first();
- AuthSessionPtr session = std::make_shared<AuthSession>();
MinecraftAccountPtr account = selected.data(AccountList::PointerRole).value<MinecraftAccountPtr>();
- auto login = account->refresh(session);
ProgressDialog prog(this);
- if (prog.execWithTask((Task*)login.get()) != QDialog::Accepted) {
- CustomMessageBox::selectable(this, tr("Skin Delete"), tr("Failed to login!"), QMessageBox::Warning)->exec();
- return;
- }
- auto deleteSkinTask = std::make_shared<SkinDelete>(this, session);
+ auto deleteSkinTask = std::make_shared<SkinDelete>(this, account->accessToken());
if (prog.execWithTask((Task*)deleteSkinTask.get()) != QDialog::Accepted) {
CustomMessageBox::selectable(this, tr("Skin Delete"), tr("Failed to delete current skin!"), QMessageBox::Warning)->exec();
return;