From eb48292a3a69ac5ffac91cdb0c5e5349ae8f85eb Mon Sep 17 00:00:00 2001 From: Chris Duarte Date: Thu, 29 Mar 2018 07:04:17 -0700 Subject: Add ExperimentalTimezone flag (#8539) --- config/default.json | 3 +++ model/config.go | 12 ++++++++++++ utils/config.go | 1 + 3 files changed, 16 insertions(+) diff --git a/config/default.json b/config/default.json index ed0af5cc6..56783753b 100644 --- a/config/default.json +++ b/config/default.json @@ -92,6 +92,9 @@ "ExperimentalTownSquareIsReadOnly": false, "ExperimentalPrimaryTeam": "" }, + "DisplaySettings": { + "ExperimentalTimezone": false + }, "ClientRequirements": { "AndroidLatestVersion": "", "AndroidMinVersion": "", diff --git a/model/config.go b/model/config.go index f1017d15a..17a0aafbf 100644 --- a/model/config.go +++ b/model/config.go @@ -1712,6 +1712,16 @@ func (s *MessageExportSettings) SetDefaults() { } } +type DisplaySettings struct { + ExperimentalTimezone *bool +} + +func (s *DisplaySettings) SetDefaults() { + if s.ExperimentalTimezone == nil { + s.ExperimentalTimezone = NewBool(false) + } +} + type TimezoneSettings struct { SupportedTimezonesPath *string } @@ -1755,6 +1765,7 @@ type Config struct { MessageExportSettings MessageExportSettings JobSettings JobSettings PluginSettings PluginSettings + DisplaySettings DisplaySettings TimezoneSettings TimezoneSettings } @@ -1826,6 +1837,7 @@ func (o *Config) SetDefaults() { o.WebrtcSettings.SetDefaults() o.MessageExportSettings.SetDefaults() o.TimezoneSettings.SetDefaults() + o.DisplaySettings.SetDefaults() } func (o *Config) IsValid() *AppError { diff --git a/utils/config.go b/utils/config.go index 35a21dea4..13295b362 100644 --- a/utils/config.go +++ b/utils/config.go @@ -382,6 +382,7 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L props["EnableTutorial"] = strconv.FormatBool(*c.ServiceSettings.EnableTutorial) props["ExperimentalEnableDefaultChannelLeaveJoinMessages"] = strconv.FormatBool(*c.ServiceSettings.ExperimentalEnableDefaultChannelLeaveJoinMessages) props["ExperimentalGroupUnreadChannels"] = *c.ServiceSettings.ExperimentalGroupUnreadChannels + props["ExperimentalTimezone"] = strconv.FormatBool(*c.DisplaySettings.ExperimentalTimezone) props["SendEmailNotifications"] = strconv.FormatBool(c.EmailSettings.SendEmailNotifications) props["SendPushNotifications"] = strconv.FormatBool(*c.EmailSettings.SendPushNotifications) -- cgit v1.2.3-1-g7c22