MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / fillQueue

Method fillQueue

launcher/minecraft/auth/AccountList.cpp:676–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674}
675
676void AccountList::fillQueue() {
677
678 if(m_defaultAccount && m_defaultAccount->shouldRefresh()) {
679 auto idToRefresh = m_defaultAccount->internalId();
680 m_refreshQueue.push_back(idToRefresh);
681 qDebug() << "AccountList: Queued default account with internal ID " << idToRefresh << " to refresh first";
682 }
683
684 for(int i = 0; i < count(); i++) {
685 auto account = at(i);
686 if(account == m_defaultAccount) {
687 continue;
688 }
689
690 if(account->shouldRefresh()) {
691 auto idToRefresh = account->internalId();
692 queueRefresh(idToRefresh);
693 }
694 }
695 tryNext();
696}
697
698void AccountList::requestRefresh(QString accountId) {
699 auto index = m_refreshQueue.indexOf(accountId);

Callers 1

ApplicationMethod · 0.80

Calls 2

shouldRefreshMethod · 0.80
internalIdMethod · 0.80

Tested by

no test coverage detected