fix(ManagedPagePage): don't reload pack info when not needed
Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
parent
089018015a
commit
4e75419e08
@ -66,6 +66,7 @@ ManagedPackPage::ManagedPackPage(BaseInstance* inst, InstanceWindow* instance_wi
|
|||||||
connect(ui->reloadButton, &QPushButton::clicked, this, [this](bool){
|
connect(ui->reloadButton, &QPushButton::clicked, this, [this](bool){
|
||||||
ui->reloadButton->setVisible(false);
|
ui->reloadButton->setVisible(false);
|
||||||
|
|
||||||
|
m_loaded = false;
|
||||||
// Pretend we're opening the page again
|
// Pretend we're opening the page again
|
||||||
openedImpl();
|
openedImpl();
|
||||||
});
|
});
|
||||||
@ -179,6 +180,10 @@ void ModrinthManagedPackPage::parseManagedPack()
|
|||||||
{
|
{
|
||||||
qDebug() << "Parsing Modrinth pack";
|
qDebug() << "Parsing Modrinth pack";
|
||||||
|
|
||||||
|
// No need for the extra work because we already have everything we need.
|
||||||
|
if (m_loaded)
|
||||||
|
return;
|
||||||
|
|
||||||
if (m_fetch_job && m_fetch_job->isRunning())
|
if (m_fetch_job && m_fetch_job->isRunning())
|
||||||
m_fetch_job->abort();
|
m_fetch_job->abort();
|
||||||
|
|
||||||
@ -318,6 +323,10 @@ void FlameManagedPackPage::parseManagedPack()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No need for the extra work because we already have everything we need.
|
||||||
|
if (m_loaded)
|
||||||
|
return;
|
||||||
|
|
||||||
if (m_fetch_job && m_fetch_job->isRunning())
|
if (m_fetch_job && m_fetch_job->isRunning())
|
||||||
m_fetch_job->abort();
|
m_fetch_job->abort();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user