mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 18:38:15 +01:00
Add "new conversation" composer for direct messages
This commit is contained in:
13
ts/util/isConversationUnread.ts
Normal file
13
ts/util/isConversationUnread.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
// 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));
|
||||
Reference in New Issue
Block a user