MM-10272: Add a count for pinned posts header icon (#11840)

Этот коммит содержится в:
Woolim Cho
2019-09-04 20:41:29 +09:00
коммит произвёл Ben Schumacher
родитель 5a477a617a
Коммит b9a3c2e90e
11 изменённых файлов: 231 добавлений и 4 удалений

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

@@ -1382,6 +1382,23 @@ func (s *TimerLayerChannelStore) InvalidateMemberCount(channelId string) {
return
}
func (s *TimerLayerChannelStore) InvalidatePinnedPostCount(channelId string) {
start := timemodule.Now()
s.ChannelStore.InvalidatePinnedPostCount(channelId)
t := timemodule.Now()
elapsed := t.Sub(start)
if s.Root.Metrics != nil {
success := "false"
if true {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("ChannelStore.InvalidatePinnedPostCount", success, float64(elapsed))
}
return
}
func (s *TimerLayerChannelStore) IsUserInChannelUseCache(userId string, channelId string) bool {
start := timemodule.Now()