improve login account checking
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
31d0cad377
commit
2b949a8059
5 changed files with 2 additions and 28 deletions
|
@ -871,29 +871,6 @@ void MainWindow::on_actionCopyInstance_triggered()
|
|||
runModalTask(task.get());
|
||||
}
|
||||
|
||||
void MainWindow::finalizeInstance(InstancePtr inst)
|
||||
{
|
||||
view->updateGeometries();
|
||||
setSelectedInstanceById(inst->id());
|
||||
if (APPLICATION->accounts()->anyAccountIsValid()) {
|
||||
ProgressDialog loadDialog(this);
|
||||
auto update = inst->createUpdateTask(Net::Mode::Online);
|
||||
connect(update.get(), &Task::failed, [this](QString reason) {
|
||||
QString error = QString("Instance load failed: %1").arg(reason);
|
||||
CustomMessageBox::selectable(this, tr("Error"), error, QMessageBox::Warning)->show();
|
||||
});
|
||||
if (update) {
|
||||
loadDialog.setSkipButton(true, tr("Abort"));
|
||||
loadDialog.execWithTask(update.get());
|
||||
}
|
||||
} else {
|
||||
CustomMessageBox::selectable(this, tr("Error"),
|
||||
tr("The launcher cannot download Minecraft or update instances unless you have at least "
|
||||
"one account added.\nPlease add a Microsoft account."),
|
||||
QMessageBox::Warning)
|
||||
->show();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::addInstance(const QString& url, const QMap<QString, QString>& extra_info)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue