From 30a1e4da99688b12da53ebbe8e5a11f9beacb1f2 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Tue, 7 Jan 2020 17:11:26 +1100 Subject: [PATCH] display unreadcount in actionpanel even on search mode --- ts/components/LeftPane.tsx | 3 ++- ts/components/session/ActionsPanel.tsx | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ts/components/LeftPane.tsx b/ts/components/LeftPane.tsx index 6bd84503d..51c787dfa 100644 --- a/ts/components/LeftPane.tsx +++ b/ts/components/LeftPane.tsx @@ -45,6 +45,7 @@ interface Props { sentFriendsRequest: Array; receivedFriendsRequest: Array; unreadMessageCount: number; + receivedFriendRequestCount: number; searchResults?: SearchResultsProps; searchTerm: string; isSecondaryDevice: boolean; @@ -171,7 +172,7 @@ export class LeftPane extends React.Component { selectedSection={this.state.selectedSection} onSectionSelected={this.handleSectionSelected} conversations={this.props.conversations} - receivedFriendsRequest={this.props.receivedFriendsRequest} + receivedFriendRequestCount={this.props.receivedFriendRequestCount} unreadMessageCount={this.props.unreadMessageCount} />
{this.renderSection()}
diff --git a/ts/components/session/ActionsPanel.tsx b/ts/components/session/ActionsPanel.tsx index 485e69e1d..93d4be53a 100644 --- a/ts/components/session/ActionsPanel.tsx +++ b/ts/components/session/ActionsPanel.tsx @@ -20,8 +20,8 @@ interface Props { onSectionSelected: any; selectedSection: SectionType; conversations: Array | undefined; - receivedFriendsRequest: Array; unreadMessageCount: number; + receivedFriendRequestCount: number; } const Section = ({ @@ -140,12 +140,10 @@ export class ActionsPanel extends React.Component { public render(): JSX.Element { const { selectedSection, - receivedFriendsRequest, unreadMessageCount, + receivedFriendRequestCount, } = this.props; - const friendRequestCount = receivedFriendsRequest.length; - const isProfilePageSelected = selectedSection === SectionType.Profile; const isMessagePageSelected = selectedSection === SectionType.Message; const isContactPageSelected = selectedSection === SectionType.Contact; @@ -171,7 +169,7 @@ export class ActionsPanel extends React.Component { type={SectionType.Contact} isSelected={isContactPageSelected} onSelect={this.handleSectionSelect} - notificationCount={friendRequestCount} + notificationCount={receivedFriendRequestCount} />