[MM-15301] Migrate "Preference.IsFeatureEnabled" to Sync by default (#10945)

* [MM-15301] Migrate "Preference.IsFeatureEnabled" to Sync by default

* Remove else clause from 'IsFeatureEnabled'
Этот коммит содержится в:
Bolarinwa Balogun
2019-05-28 10:04:24 -04:00
коммит произвёл George Goldberg
родитель bdcee4d979
Коммит 78b525df89
4 изменённых файлов: 41 добавлений и 35 удалений

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

@@ -151,19 +151,26 @@ func (_m *PreferenceStore) GetCategory(userId string, category string) (model.Pr
}
// IsFeatureEnabled provides a mock function with given fields: feature, userId
func (_m *PreferenceStore) IsFeatureEnabled(feature string, userId string) store.StoreChannel {
func (_m *PreferenceStore) IsFeatureEnabled(feature string, userId string) (bool, *model.AppError) {
ret := _m.Called(feature, userId)
var r0 store.StoreChannel
if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok {
var r0 bool
if rf, ok := ret.Get(0).(func(string, string) bool); ok {
r0 = rf(feature, userId)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(store.StoreChannel)
r0 = ret.Get(0).(bool)
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
r1 = rf(feature, userId)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0
return r0, r1
}
// PermanentDeleteByUser provides a mock function with given fields: userId