Files
Desktop/ts/util/isConversationUnread.std.ts
Fedor Indutny 44076ece79 Rename files
2025-10-16 23:45:44 -07:00

16 lines
364 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 =>
Boolean(markedUnread || (isNumber(unreadCount) && unreadCount > 0));