Ensure the right radio is selected when selective sync is picked

This got broken previously when trying to reconcile during a
cherry-pick. This also repairs the case when the theme tells us the
default is to not select anything (not that we're using this right now
but in case we'd like to brand this).

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2021-01-25 16:53:21 +01:00
Родитель 2b2dac10ef
Коммит 4992bfa8ef
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 074BBBCB8DECC9E2
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -149,6 +149,7 @@ void OwncloudAdvancedSetupPage::initializePage()
if (Theme::instance()->wizardSelectiveSyncDefaultNothing()) {
_selectiveSyncBlacklist = QStringList("/");
setRadioChecked(_ui.rSelectiveSync);
QTimer::singleShot(0, this, &OwncloudAdvancedSetupPage::slotSelectiveSyncClicked);
}
@ -367,6 +368,9 @@ void OwncloudAdvancedSetupPage::slotSelectiveSyncClicked()
if (updateBlacklist) {
if (!_selectiveSyncBlacklist.isEmpty()) {
_ui.rSelectiveSync->blockSignals(true);
setRadioChecked(_ui.rSelectiveSync);
_ui.rSelectiveSync->blockSignals(false);
auto s = dlg->estimatedSize();
if (s > 0) {
_ui.lSelectiveSyncSizeLabel->setText(tr("(%1)").arg(Utility::octetsToString(s)));