Update channel count when markin items read
This commit is contained in:
parent
fc4400a3c8
commit
0ef60c5a4c
|
@ -634,5 +634,13 @@ func (b *memoryBackend) MarkRead(channel string, uids []string) {
|
|||
log.Printf("Marking read for channel %s has failed\n", channel)
|
||||
}
|
||||
|
||||
unread, _ := redis.Int(conn.Do("ZCARD", channelKey))
|
||||
unread -= len(uids)
|
||||
|
||||
if ch, e := b.Channels[channel]; e {
|
||||
ch.Unread = unread
|
||||
b.Channels[channel] = ch
|
||||
}
|
||||
|
||||
log.Printf("Marking read success for %s %v\n", channel, itemUIDs)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user