hunk.code_window: import PostList from './post_list';
   interface Props {
       lastViewedAt: number;
       channelLoading: boolean;
       channelId: string;
       focusedPostId?: string;
       unreadScrollPosition: string;
  
hunk.labels: keep keep keep keep replace keep keep keep keep
hunk.after_edit:     lastViewedAt?: number;
  
hunk.file_path: webapp/channels/src/components/post_view/post_view.tsx
hunk.type: replace
file: // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
  // See LICENSE.txt for license information.
  
  import {ComponentProps} from 'react';
  import {connect} from 'react-redux';
  import {bindActionCreators, Dispatch} from 'redux';
  import {withRouter, RouteChildrenProps, matchPath} from 'react-router-dom';
  
  import {getCurrentChannel, getUnreadStatus} from 'mattermost-redux/selectors/entities/channels';
  import {getConfig} from 'mattermost-redux/selectors/entities/general';
  import {getCurrentTeam} from 'mattermost-redux/selectors/entities/teams';
  import {GlobalState} from '@mattermost/types/store';
  import {GenericAction} from 'mattermost-redux/types/actions';
  
  import FaviconTitleHandler from './favicon_title_handler';
  
  type Props = RouteChildrenProps;
  
  function mapStateToProps(state: GlobalState, {location: {pathname}}: Props): ComponentProps<typeof FaviconTitleHandler> {
      const config = getConfig(state);
      const currentChannel = getCurrentChannel(state);
      const currentTeammate = (currentChannel && currentChannel.teammate_id) ? currentChannel : null;
      const currentTeam = getCurrentTeam(state);
  
      return {
          currentChannel,
          currentTeam,
          currentTeammate,
          siteName: config.SiteName,
          unreadStatus: getUnreadStatus(state),
          inGlobalThreads: matchPath(pathname, {path: '/:team/threads/:threadIdentifier?'}) != null,
          inDrafts: matchPath(pathname, {path: '/:team/drafts'}) != null,
      };
  }
  
  function mapDispatchToProps(dispatch: Dispatch<GenericAction>) {
      return {
          actions: bindActionCreators({
          }, dispatch),
      };
  }
  
  export default withRouter(connect(mapStateToProps, mapDispatchToProps)(FaviconTitleHandler));
  