MM-25723 Add an experimental setting for data prefetching (#14731)

* MM-25723 Add an experimental setting for data prefetching

* Fix formatting

* Fix bool error

* Fix lint error

* Change default to true
Этот коммит содержится в:
Sudheer
2020-06-03 14:43:59 +05:30
коммит произвёл GitHub
родитель e3255879ba
Коммит 1b95b82b18
3 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@@ -356,6 +356,7 @@ func (a *App) trackConfig() {
"enable_svgs": *cfg.ServiceSettings.EnableSVGs,
"enable_latex": *cfg.ServiceSettings.EnableLatex,
"enable_opentracing": *cfg.ServiceSettings.EnableOpenTracing,
"experimental_data_prefetch": *cfg.ServiceSettings.ExperimentalDataPrefetch,
})
a.SendDiagnostic(TRACK_CONFIG_TEAM, map[string]interface{}{

Просмотреть файл

@@ -62,6 +62,8 @@ func GenerateClientConfig(c *model.Config, diagnosticID string, license *model.L
props["ExperimentalEnableAutomaticReplies"] = strconv.FormatBool(*c.TeamSettings.ExperimentalEnableAutomaticReplies)
props["ExperimentalTimezone"] = strconv.FormatBool(*c.DisplaySettings.ExperimentalTimezone)
props["ExperimentalDataPrefetch"] = strconv.FormatBool(*c.ServiceSettings.ExperimentalDataPrefetch)
props["SendEmailNotifications"] = strconv.FormatBool(*c.EmailSettings.SendEmailNotifications)
props["SendPushNotifications"] = strconv.FormatBool(*c.EmailSettings.SendPushNotifications)
props["RequireEmailVerification"] = strconv.FormatBool(*c.EmailSettings.RequireEmailVerification)

Просмотреть файл

@@ -322,6 +322,7 @@ type ServiceSettings struct {
ExperimentalGroupUnreadChannels *string
ExperimentalChannelOrganization *bool
ExperimentalChannelSidebarOrganization *string
ExperimentalDataPrefetch *bool
DEPRECATED_DO_NOT_USE_ImageProxyType *string `json:"ImageProxyType" mapstructure:"ImageProxyType"` // This field is deprecated and must not be used.
DEPRECATED_DO_NOT_USE_ImageProxyURL *string `json:"ImageProxyURL" mapstructure:"ImageProxyURL"` // This field is deprecated and must not be used.
DEPRECATED_DO_NOT_USE_ImageProxyOptions *string `json:"ImageProxyOptions" mapstructure:"ImageProxyOptions"` // This field is deprecated and must not be used.
@@ -678,6 +679,10 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
s.ExperimentalChannelSidebarOrganization = NewString("disabled")
}
if s.ExperimentalDataPrefetch == nil {
s.ExperimentalDataPrefetch = NewBool(true)
}
if s.DEPRECATED_DO_NOT_USE_ImageProxyType == nil {
s.DEPRECATED_DO_NOT_USE_ImageProxyType = NewString("")
}