Pinned Chats
This commit is contained in:
parent
6e1a83ae4e
commit
6a7d45b6fc
9 changed files with 176 additions and 27 deletions
|
@ -35,6 +35,7 @@ export interface PropsDataType {
|
|||
isVerified?: boolean;
|
||||
isMe?: boolean;
|
||||
isArchived?: boolean;
|
||||
isPinned?: boolean;
|
||||
|
||||
disableTimerChanges?: boolean;
|
||||
expirationSettingName?: string;
|
||||
|
@ -51,6 +52,7 @@ export interface PropsActionsType {
|
|||
onSearchInConversation: () => void;
|
||||
onOutgoingAudioCallInConversation: () => void;
|
||||
onOutgoingVideoCallInConversation: () => void;
|
||||
onSetPin: (value: boolean) => void;
|
||||
|
||||
onShowSafetyNumber: () => void;
|
||||
onShowAllMedia: () => void;
|
||||
|
@ -313,6 +315,7 @@ export class ConversationHeader extends React.Component<PropsType> {
|
|||
i18n,
|
||||
isAccepted,
|
||||
isMe,
|
||||
isPinned,
|
||||
type,
|
||||
isArchived,
|
||||
muteExpirationLabel,
|
||||
|
@ -324,6 +327,7 @@ export class ConversationHeader extends React.Component<PropsType> {
|
|||
onShowGroupMembers,
|
||||
onShowSafetyNumber,
|
||||
onArchive,
|
||||
onSetPin,
|
||||
onMoveToInbox,
|
||||
timerOptions,
|
||||
} = this.props;
|
||||
|
@ -402,6 +406,15 @@ export class ConversationHeader extends React.Component<PropsType> {
|
|||
) : (
|
||||
<MenuItem onClick={onArchive}>{i18n('archiveConversation')}</MenuItem>
|
||||
)}
|
||||
{isPinned ? (
|
||||
<MenuItem onClick={() => onSetPin(false)}>
|
||||
{i18n('unpinConversation')}
|
||||
</MenuItem>
|
||||
) : (
|
||||
<MenuItem onClick={() => onSetPin(true)}>
|
||||
{i18n('pinConversation')}
|
||||
</MenuItem>
|
||||
)}
|
||||
<MenuItem onClick={onDeleteMessages}>{i18n('deleteMessages')}</MenuItem>
|
||||
</ContextMenu>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue