filter out conversation friend request in message view

pull/712/head
Audric Ackermann 5 years ago
parent 7bb0788a3a
commit 5d6dd5dab0

@ -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;

@ -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<Props, any> {
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<Props, any> {
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 });
}
}

@ -60,7 +60,8 @@ export class LeftPaneMessageSection extends React.Component<Props, any> {
let conversationList = conversations;
if (conversationList !== undefined) {
conversationList = conversationList.filter(
conversation => !conversation.isSecondary
conversation => !conversation.isSecondary
&& !conversation.showFriendRequestIndicator
);
}

Loading…
Cancel
Save