Check for automatic update and add a hint in SEND-LAST-MESSAGE.

This commit is contained in:
2024-01-19 13:40:24 +01:00
parent 41392a98e3
commit 6b3ebde2b5
2 changed files with 16 additions and 5 deletions

View File

@@ -270,12 +270,14 @@ void Worker::privateUpdate() {
m_ismasTriggerActive = false;
m_updateNotNecessary = false;
QDateTime const &current = QDateTime::currentDateTime();
m_automaticUpdate = (current.time().hour() < 4);
m_ismasTriggerActive = updateTriggerSet();
if (m_ismasTriggerActive == false) {
if (QDir(m_customerRepository).exists()) { // ignore a possibly corrupted repository
m_versionInfo = m_gc.gitShowReason(m_branchName);
QDateTime const &current = QDateTime::currentDateTime();
if (current.time().hour() < 4) { // update has been triggered within [00:00:00, 00:03:59]
if (m_automaticUpdate) { // update has been triggered within [00:00:00, 00:03:59]
m_updateNotNecessary = true;
m_ismasTriggerStatusMessage = QStringList(QString("NO UPDATE NECESSARY (%1)").arg(current.toString(Qt::ISODate)));
m_lastFailedUpdateStep = UPDATE_STEP::NONE;