mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-19 17:58:48 +00:00
14 lines
340 B
TypeScript
14 lines
340 B
TypeScript
// Copyright 2021 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import { isNumber } from 'lodash';
|
|
|
|
export const isConversationUnread = ({
|
|
markedUnread,
|
|
unreadCount,
|
|
}: Readonly<{
|
|
unreadCount?: number;
|
|
markedUnread?: boolean;
|
|
}>): boolean =>
|
|
Boolean(markedUnread || (isNumber(unreadCount) && unreadCount > 0));
|