fix: Change code formatting and description string

Signed-off-by: Mike Mengjie Huang <mike0609king@gmail.com>
This commit is contained in:
Mike Mengjie Huang 2025-07-14 22:43:09 +02:00 committed by Matthieu Gallien
parent 2e31dce2c0
commit d62c9ebdb6
2 changed files with 12 additions and 4 deletions

View File

@ -196,7 +196,7 @@ GeneralSettings::GeneralSettings(QWidget *parent)
_ui->callNotificationsCheckBox->setToolTip(tr("Show call notification dialogs."));
connect(_ui->quotaWarningNotificationsCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotToggleQuotaWarningNotifications);
_ui->quotaWarningNotificationsCheckBox->setToolTip(tr("Receive notification when storage usage exceeds 80/90/95 percent"));
_ui->quotaWarningNotificationsCheckBox->setToolTip(tr("Show notification when quota usage exceeds 80%"));
connect(_ui->showInExplorerNavigationPaneCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotShowInExplorerNavigationPane);

View File

@ -1209,9 +1209,17 @@ void User::slotUpdateQuota(qint64 total, qint64 used)
qCDebug(lcActivity) << tr("Quota is updated; %1 percent of the total space is used.").arg(QString::number(percentInt));
int threshold_passed = 0;
if (_lastQuotaPercent < 80 && percentInt >= 80) threshold_passed = 80;
if (_lastQuotaPercent < 90 && percentInt >= 90) threshold_passed = 90;
if (_lastQuotaPercent < 95 && percentInt >= 95) threshold_passed = 95;
if (_lastQuotaPercent < 80 && percentInt >= 80) {
threshold_passed = 80;
}
if (_lastQuotaPercent < 90 && percentInt >= 90) {
threshold_passed = 90;
}
if (_lastQuotaPercent < 95 && percentInt >= 95) {
threshold_passed = 95;
}
if (threshold_passed > 0) {
_activityModel->removeActivityFromActivityList(_lastQuotaActivity);