aboutsummaryrefslogtreecommitdiffstats
path: root/src/m_ver_check/UpdateTab.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2026-09-24 23:25:25 +0200
committersaturneric <[email protected]>2026-09-24 23:25:25 +0200
commit1c95ebf2cbb4d4c841141f568eb394f4091b6ba7 (patch)
treeedc4ae7cddc999d9500cc10dd6c83821c14fd9e0 /src/m_ver_check/UpdateTab.cpp
parentfeat(update): add robust GitHub update checking (diff)
downloadmodules-1c95ebf2cbb4d4c841141f568eb394f4091b6ba7.tar.gz
modules-1c95ebf2cbb4d4c841141f568eb394f4091b6ba7.zip
feat(update): track unseen releases without prompting
- replace startup dialogs with quiet background update checks - track and persist the latest update seen by the user - expose update attention state for badges and UI indicators - acknowledge updates when the update page is opened - retain acknowledgements across failures, restarts, and rebuilds - expand tests for attention, persistence, and rediscovered releases
Diffstat (limited to 'src/m_ver_check/UpdateTab.cpp')
-rw-r--r--src/m_ver_check/UpdateTab.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/m_ver_check/UpdateTab.cpp b/src/m_ver_check/UpdateTab.cpp
index bc998d4..e123f6e 100644
--- a/src/m_ver_check/UpdateTab.cpp
+++ b/src/m_ver_check/UpdateTab.cpp
@@ -141,7 +141,11 @@ UpdateTab::UpdateTab(QWidget* parent)
});
if (!checker_.isNull()) {
- connect(checker_, &UpdateChecker::Changed, this, &UpdateTab::render);
+ connect(checker_, &UpdateChecker::Changed, this, [this] {
+ // An update found while the page is open has been seen.
+ if (isVisible()) checker_->Acknowledge();
+ render();
+ });
}
// Readable at once: a check that finished before this dialog existed has
@@ -192,6 +196,9 @@ void UpdateTab::apply(const UpdateView& view) {
void UpdateTab::showEvent(QShowEvent* event) {
QWidget::showEvent(event);
+ // Opening the page is seeing whatever update it advertises: the badge on
+ // the menu entry goes, until a still newer release turns up.
+ if (!checker_.isNull()) checker_->Acknowledge();
render();
// The Host's own switch, the one the setup wizard and this module's