summaryrefslogtreecommitdiff
path: root/src/managers/VersionKeeperManager.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2026-02-19 01:05:28 +0000
committerVaxry <vaxry@vaxry.net>2026-02-19 01:05:28 +0000
commit7a566942d53fe3f53a3287077af57d9aefdc41e0 (patch)
tree0bd5bbfcbee8e250e426f2de5884862f67682501 /src/managers/VersionKeeperManager.cpp
parent68456a5d9a54f34b70a8261153dc7d35c17f2bf0 (diff)
versionKeeper: ignore minor rev version
no point in firing the update screen when no breaking changes happen on point releases
Diffstat (limited to 'src/managers/VersionKeeperManager.cpp')
-rw-r--r--src/managers/VersionKeeperManager.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/managers/VersionKeeperManager.cpp b/src/managers/VersionKeeperManager.cpp
index 6f94fbe5..b1d167fa 100644
--- a/src/managers/VersionKeeperManager.cpp
+++ b/src/managers/VersionKeeperManager.cpp
@@ -34,8 +34,8 @@ CVersionKeeperManager::CVersionKeeperManager() {
return;
}
- if (!isVersionOlderThanRunning(*LASTVER)) {
- Log::logger->log(Log::DEBUG, "CVersionKeeperManager: Read version {} matches or is older than running.", *LASTVER);
+ if (!isMajorVersionOlderThanRunning(*LASTVER)) {
+ Log::logger->log(Log::DEBUG, "CVersionKeeperManager: Read version {} matches or is older than running major.", *LASTVER);
return;
}
@@ -59,25 +59,21 @@ CVersionKeeperManager::CVersionKeeperManager() {
});
}
-bool CVersionKeeperManager::isVersionOlderThanRunning(const std::string& ver) {
+bool CVersionKeeperManager::isMajorVersionOlderThanRunning(const std::string& ver) {
const CVarList verStrings(ver, 0, '.', true);
const int V1 = configStringToInt(verStrings[0]).value_or(0);
const int V2 = configStringToInt(verStrings[1]).value_or(0);
- const int V3 = configStringToInt(verStrings[2]).value_or(0);
static const CVarList runningStrings(HYPRLAND_VERSION, 0, '.', true);
static const int R1 = configStringToInt(runningStrings[0]).value_or(0);
static const int R2 = configStringToInt(runningStrings[1]).value_or(0);
- static const int R3 = configStringToInt(runningStrings[2]).value_or(0);
if (R1 > V1)
return true;
if (R2 > V2)
return true;
- if (R3 > V3)
- return true;
return false;
}