Skip to content

Commit

Permalink
If the client is branded the default update channel is stable.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila Ayres <[email protected]>
  • Loading branch information
camilasan committed Jul 3, 2024
1 parent 94736b2 commit 106bb08
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libsync/configfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,10 @@ QStringList ConfigFile::validUpdateChannels() const

QString ConfigFile::defaultUpdateChannel() const
{
if (serverHasValidSubscription() && !Theme::instance()->isBranded()) {
const auto isBranded = Theme::instance()->isBranded();
auto defaultChannel = defaultUpdateChannelName;

if (serverHasValidSubscription() && !isBranded) {
if (const auto serverChannel = desktopEnterpriseChannel();
validUpdateChannels().contains(serverChannel)) {
qCWarning(lcConfigFile()) << "Enforcing update channel" << serverChannel << "because that is the desktop enterprise channel returned by the server.";
Expand All @@ -712,11 +715,12 @@ QString ConfigFile::defaultUpdateChannel() const
}

if (const auto currentVersionSuffix = Theme::instance()->versionSuffix();
validUpdateChannels().contains(currentVersionSuffix)) {
validUpdateChannels().contains(currentVersionSuffix) && !isBranded) {
qCWarning(lcConfigFile()) << "Enforcing update channel" << currentVersionSuffix << "because of the version suffix of the current client.";
return currentVersionSuffix;
}

qCWarning(lcConfigFile()) << "Enforcing default update channel" << defaultUpdateChannelName;
return defaultUpdateChannelName;
}

Expand Down

0 comments on commit 106bb08

Please sign in to comment.