mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
improve login account checking
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user