Skip to content

Commit

Permalink
hyprpm: update global state on plugin recompile not header update
Browse files Browse the repository at this point in the history
ref #4547
  • Loading branch information
vaxerski committed Jan 29, 2024
1 parent 3d0d3b6 commit 3ff59e7
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions hyprpm/src/core/PluginManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,6 @@ bool CPluginManager::updateHeaders(bool force) {
progress.m_szCurrentMessage = "Done!";
progress.print();

auto GLOBALSTATE = DataState::getGlobalState();
GLOBALSTATE.headersHashCompiled = HLVER.hash;
DataState::updateGlobalState(GLOBALSTATE);

std::cout << "\n";
} else {
progress.printMessageAbove(std::string{Colors::RED} + "" + Colors::RESET + " failed to install headers with error code " + std::to_string((int)HEADERSVALID));
Expand Down Expand Up @@ -438,7 +434,7 @@ bool CPluginManager::updatePlugins(bool forceUpdateAll) {
const auto HLVER = getHyprlandVersion();

CProgressBar progress;
progress.m_iMaxSteps = REPOS.size() * 2 + 1;
progress.m_iMaxSteps = REPOS.size() * 2 + 2;
progress.m_iSteps = 0;
progress.m_szCurrentMessage = "Updating repositories";
progress.print();
Expand Down Expand Up @@ -570,6 +566,14 @@ bool CPluginManager::updatePlugins(bool forceUpdateAll) {
progress.printMessageAbove(std::string{Colors::GREEN} + "" + Colors::RESET + " updated " + repo.name);
}

progress.m_iSteps++;
progress.m_szCurrentMessage = "Updating global state...";
progress.print();

auto GLOBALSTATE = DataState::getGlobalState();
GLOBALSTATE.headersHashCompiled = HLVER.hash;
DataState::updateGlobalState(GLOBALSTATE);

progress.m_iSteps++;
progress.m_szCurrentMessage = "Done!";
progress.print();
Expand Down

0 comments on commit 3ff59e7

Please sign in to comment.