Show group names in notifications, and only show the latest

This commit is contained in:
Evan Hahn 2020-09-04 18:07:24 -05:00 committed by Scott Nonnenberg
parent 496a90efbb
commit 91a591c6ca
7 changed files with 161 additions and 364 deletions

View file

@ -3,7 +3,7 @@ interface Environment {
isAudioNotificationEnabled: boolean;
isAudioNotificationSupported: boolean;
isEnabled: boolean;
numNotifications: number;
hasNotifications: boolean;
userSetting: UserSetting;
}
@ -28,7 +28,7 @@ export const getStatus = ({
isAudioNotificationEnabled,
isAudioNotificationSupported,
isEnabled,
numNotifications,
hasNotifications,
userSetting,
}: Environment): Status => {
const type = ((): Type => {
@ -36,7 +36,6 @@ export const getStatus = ({
return 'disabled';
}
const hasNotifications = numNotifications > 0;
if (!hasNotifications) {
return 'noNotifications';
}