mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 12:19:03 +03:00
List enterprise update channel when available.
Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
parent
a4c114e658
commit
ee032827a1
1 changed files with 11 additions and 0 deletions
|
@ -282,6 +282,10 @@ void GeneralSettings::loadMiscSettings()
|
|||
|
||||
#if defined(BUILD_UPDATER)
|
||||
auto validUpdateChannels = cfgFile.validUpdateChannels();
|
||||
if (const auto serverHasValidSubscription = cfgFile.serverHasValidSubscription();
|
||||
serverHasValidSubscription) {
|
||||
validUpdateChannels << QStringLiteral("enterprise");
|
||||
}
|
||||
_ui->updateChannel->addItems(validUpdateChannels);
|
||||
const auto currentUpdateChannelIndex = validUpdateChannels.indexOf(cfgFile.currentUpdateChannel());
|
||||
_ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1? currentUpdateChannelIndex : 0);
|
||||
|
@ -359,6 +363,10 @@ void GeneralSettings::slotUpdateChannelChanged()
|
|||
return tr("daily");
|
||||
}
|
||||
|
||||
if (channel == QStringLiteral("enterprise")) {
|
||||
return tr("enterprise");
|
||||
}
|
||||
|
||||
return QString{};
|
||||
};
|
||||
|
||||
|
@ -370,6 +378,9 @@ void GeneralSettings::slotUpdateChannelChanged()
|
|||
case 2:
|
||||
return QStringLiteral("daily");
|
||||
break;
|
||||
case 3:
|
||||
return QStringLiteral("enterprise");
|
||||
break;
|
||||
default:
|
||||
return QStringLiteral("stable");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue