зеркало из https://github.com/nextcloud/desktop.git
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:
Родитель
2b2dac10ef
Коммит
4992bfa8ef
|
@ -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)));
|
||||
|
|
Загрузка…
Ссылка в новой задаче