mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
fix: Change code formatting and description string
Signed-off-by: Mike Mengjie Huang <mike0609king@gmail.com>
This commit is contained in:
parent
2e31dce2c0
commit
d62c9ebdb6
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user