Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
ICU-716 Fixed position of channels with mentions in unreads section a…
Browse files Browse the repository at this point in the history
…fter reading (#736)
  • Loading branch information
hmhealey authored and GoldUniform committed Feb 7, 2018
1 parent ea5567e commit 2a9c7cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions reducers/views/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ function keepChannelIdAsUnread(state = null, action) {
}

const msgCount = channel.total_msg_count - member.msg_count;
const showChannelAsUnread = member.mentionCount > 0 ||
(member.notify_props.mark_unread !== NotificationLevels.MENTION && msgCount > 0);
const hadMentions = member.mention_count > 0;
const hadUnreads = member.notify_props.mark_unread !== NotificationLevels.MENTION && msgCount > 0;

if (showChannelAsUnread) {
if (hadMentions || hadUnreads) {
return {
id: member.channel_id,
hadMentions: member.mentionCount > 0
hadMentions
};
}

Expand Down

0 comments on commit 2a9c7cf

Please sign in to comment.