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 удалений

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

@@ -1330,6 +1330,10 @@ func (a *App) GetChannelGuestCount(channelId string) (int64, *model.AppError) {
return a.Srv.Store.Channel().GetGuestCount(channelId, true)
}
func (a *App) GetChannelPinnedPostCount(channelId string) (int64, *model.AppError) {
return a.Srv.Store.Channel().GetPinnedPostCount(channelId, true)
}
func (a *App) GetChannelCounts(teamId string, userId string) (*model.ChannelCounts, *model.AppError) {
return a.Srv.Store.Channel().GetChannelCounts(teamId, userId)
}

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

@@ -289,6 +289,7 @@ func (a *App) InvalidateCacheForChannelPosts(channelId string) {
func (a *App) InvalidateCacheForChannelPostsSkipClusterSend(channelId string) {
a.Srv.Store.Post().InvalidateLastPostTimeCache(channelId)
a.Srv.Store.Channel().InvalidatePinnedPostCount(channelId)
}
func (a *App) InvalidateCacheForUser(userId string) {