From 23b29ce3f5bf1860f425ebd0a52a8629537b407a Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 19 Jun 2019 12:12:19 +0100 Subject: [PATCH] Use the variables we just defined above --- src/RoomNotifs.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/RoomNotifs.js b/src/RoomNotifs.js index 5d3444b0f6..f62eeeec41 100644 --- a/src/RoomNotifs.js +++ b/src/RoomNotifs.js @@ -28,12 +28,11 @@ export const BADGE_STATES = [ALL_MESSAGES, ALL_MESSAGES_LOUD]; export const MENTION_BADGE_STATES = [...BADGE_STATES, MENTIONS_ONLY]; export function shouldShowNotifBadge(roomNotifState) { - const showBadgeInStates = [ALL_MESSAGES, ALL_MESSAGES_LOUD]; - return showBadgeInStates.indexOf(roomNotifState) > -1; + return BADGE_STATES.includes(roomNotifState); } export function shouldShowMentionBadge(roomNotifState) { - return roomNotifState !== MUTE; + return MENTION_BADGE_STATES.includes(roomNotifState); } export function aggregateNotificationCount(rooms) {