From 6a3532efc737e639de4718c32d729c81daef181a Mon Sep 17 00:00:00 2001 From: Karim Hamidou Date: Sun, 15 Jan 2017 16:21:57 -0800 Subject: [PATCH] [fix] [channel drop-down list] Show the stable channel in all cases. --- .../lib/tabs/update-channel-section.jsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/internal_packages/preferences/lib/tabs/update-channel-section.jsx b/internal_packages/preferences/lib/tabs/update-channel-section.jsx index a48afd9b1..6c253a8db 100644 --- a/internal_packages/preferences/lib/tabs/update-channel-section.jsx +++ b/internal_packages/preferences/lib/tabs/update-channel-section.jsx @@ -40,26 +40,23 @@ class UpdateChannelSection extends React.Component { // HACK: Temporarily do not allow users to move on to the Salesforce channel. // In the future we could implement this server-side via a "public" flag. - const allowedNames = ["nylas-mail", "beta"] + const allowedNames = ["stable", "nylas-mail", "beta"] + if (NylasEnv.config.get("salesforce")) { allowedNames.push("salesforce"); } - // Also a HACK: show the stable channel only for people who are on the stable - // channel. - if (current.name === "stable") { - allowedNames.push("stable"); - } - const allowed = available.filter(c => { return allowedNames.includes(c.name) || c.name === current.name }); const displayNameForChannel = (channel) => { if (channel.name === 'beta') { - return 'Beta (Unstable)' + return 'Beta (Unstable)'; } else if (channel.name === 'nylas-mail') { - return 'Nylas Mail (Stable)' + return 'Nylas Mail (Stable)'; + } else if (channel.name === 'stable') { + return 'Nylas Pro (Stable)'; } return channel.name[0].toUpperCase() + channel.name.substr(1)