From 5d6dd5dab015ce95d042bc6b1bc7ddf1eb7e1e3a Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 30 Dec 2019 15:07:53 +1100 Subject: [PATCH] filter out conversation friend request in message view --- stylesheets/_session.scss | 1 - ts/components/session/LeftPaneContactSection.tsx | 12 ++++++------ ts/components/session/LeftPaneMessageSection.tsx | 3 ++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/stylesheets/_session.scss b/stylesheets/_session.scss index 98df532d1..5d3dee638 100644 --- a/stylesheets/_session.scss +++ b/stylesheets/_session.scss @@ -67,7 +67,6 @@ $session-color-secondary: $session-shade-16; $session-background-overlay: #191919; $session-background: #121212; - $session-color-info: $session-shade-11; $session-color-success: #35d388; $session-color-error: #edd422; diff --git a/ts/components/session/LeftPaneContactSection.tsx b/ts/components/session/LeftPaneContactSection.tsx index 4e3fb98bf..adc514ff6 100644 --- a/ts/components/session/LeftPaneContactSection.tsx +++ b/ts/components/session/LeftPaneContactSection.tsx @@ -14,7 +14,6 @@ import { import { AutoSizer, List } from 'react-virtualized'; import { validateNumber } from '../../types/PhoneNumber'; - export interface Props { searchTerm: string; isSecondaryDevice: boolean; @@ -44,13 +43,14 @@ export class LeftPaneContactSection extends React.Component { this.handleTabSelected = this.handleTabSelected.bind(this); this.handleToggleOverlay = this.handleToggleOverlay.bind(this); this.handleOnAddContact = this.handleOnAddContact.bind(this); - this.handleRecipientSessionIDChanged = this.handleRecipientSessionIDChanged.bind(this); - + this.handleRecipientSessionIDChanged = this.handleRecipientSessionIDChanged.bind( + this + ); } public componentWillUnmount() { this.updateSearch(''); - this.setState({addContactRecipientID: ''}); + this.setState({ addContactRecipientID: '' }); } public handleTabSelected(tabType: number) { @@ -107,8 +107,8 @@ export class LeftPaneContactSection extends React.Component { private handleRecipientSessionIDChanged(event: any) { if (event.target.innerHTML) { - // remove br elements or div elements - const cleanText = event.target.innerHTML.replace(/<\/?[^>]+(>|$)/g, ""); + // remove br elements or div elements + const cleanText = event.target.innerHTML.replace(/<\/?[^>]+(>|$)/g, ''); this.setState({ addContactRecipientID: cleanText }); } } diff --git a/ts/components/session/LeftPaneMessageSection.tsx b/ts/components/session/LeftPaneMessageSection.tsx index 0cd39b439..7308af30c 100644 --- a/ts/components/session/LeftPaneMessageSection.tsx +++ b/ts/components/session/LeftPaneMessageSection.tsx @@ -60,7 +60,8 @@ export class LeftPaneMessageSection extends React.Component { let conversationList = conversations; if (conversationList !== undefined) { conversationList = conversationList.filter( - conversation => !conversation.isSecondary + conversation => !conversation.isSecondary + && !conversation.showFriendRequestIndicator ); }