display unreadcount in actionpanel even on search mode
This commit is contained in:
parent
277acab2a5
commit
30a1e4da99
|
@ -45,6 +45,7 @@ interface Props {
|
|||
sentFriendsRequest: Array<ConversationListItemPropsType>;
|
||||
receivedFriendsRequest: Array<ConversationListItemPropsType>;
|
||||
unreadMessageCount: number;
|
||||
receivedFriendRequestCount: number;
|
||||
searchResults?: SearchResultsProps;
|
||||
searchTerm: string;
|
||||
isSecondaryDevice: boolean;
|
||||
|
@ -171,7 +172,7 @@ export class LeftPane extends React.Component<Props, State> {
|
|||
selectedSection={this.state.selectedSection}
|
||||
onSectionSelected={this.handleSectionSelected}
|
||||
conversations={this.props.conversations}
|
||||
receivedFriendsRequest={this.props.receivedFriendsRequest}
|
||||
receivedFriendRequestCount={this.props.receivedFriendRequestCount}
|
||||
unreadMessageCount={this.props.unreadMessageCount}
|
||||
/>
|
||||
<div className="module-left-pane">{this.renderSection()}</div>
|
||||
|
|
|
@ -20,8 +20,8 @@ interface Props {
|
|||
onSectionSelected: any;
|
||||
selectedSection: SectionType;
|
||||
conversations: Array<ConversationListItemPropsType> | undefined;
|
||||
receivedFriendsRequest: Array<ConversationListItemPropsType>;
|
||||
unreadMessageCount: number;
|
||||
receivedFriendRequestCount: number;
|
||||
}
|
||||
|
||||
const Section = ({
|
||||
|
@ -140,12 +140,10 @@ export class ActionsPanel extends React.Component<Props, State> {
|
|||
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<Props, State> {
|
|||
type={SectionType.Contact}
|
||||
isSelected={isContactPageSelected}
|
||||
onSelect={this.handleSectionSelect}
|
||||
notificationCount={friendRequestCount}
|
||||
notificationCount={receivedFriendRequestCount}
|
||||
/>
|
||||
<Section
|
||||
type={SectionType.Globe}
|
||||
|
|
Loading…
Reference in New Issue