Files
Desktop/ts/util/isConversationUnread.std.ts
T
2026-04-02 16:30:34 -07:00

15 lines
353 B
TypeScript

// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import lodash from 'lodash';
const { isNumber } = lodash;
export const isConversationUnread = ({
markedUnread,
unreadCount,
}: Readonly<{
unreadCount?: number;
markedUnread?: boolean;
}>): boolean => markedUnread || (isNumber(unreadCount) && unreadCount > 0);