* Unable to open previews from search, pinned and mentions * Updated Compass Icons * Added Icon to LHS and Channel Info * Added Icons to Manage/View Members list * Added Icon to shared users in posts * Added icon to channel header, fixed header style * Added Icons in autocomplete * WIP: Add shared shannels to browse * Adding Shared Channels string to i18n * Added remote organization to remote user profile * Updated snapshot for channel header * Added browsing shared channels * Removed the exmpty line * Added snapshot when user is remote * Reverted compass icons and added icons only needed for shared channels * Fixed i18n swapped * Copied compass-icons from webapp * Fixed showing shared channels as deleted after browsing them * Added new compass ttf to android & fixed icon style for browse channel listing * Fixed search for shared channels * user profile snapshot updated with testId * User list row snapshot updated with testID * Moved shared user check to util function * Fixed required props warning for ChannelIcon component * Update app/screens/user_profile/index.js Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com> * Removed Request related redux * Reverted client4 * Added rest calls * Updated snapshot * Reverted files * Adding back shared channels stuff to channel icon & showing shared channels only when enabled in browse channels * Fixed misc issues * moved empty array outside the function to avoid re-render * Removed renaming fields Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {connect} from 'react-redux';
|
|
|
|
import {getConfig} from '@mm-redux/selectors/entities/general';
|
|
import {getTheme} from '@mm-redux/selectors/entities/preferences';
|
|
import {getCurrentUserId, getUser} from '@mm-redux/selectors/entities/users';
|
|
import {isShared} from '@mm-redux/utils/user_utils';
|
|
import {isGuest} from '@utils/users';
|
|
|
|
import AtMentionItem from './at_mention_item';
|
|
|
|
function mapStateToProps(state, ownProps) {
|
|
const user = getUser(state, ownProps.userId);
|
|
const config = getConfig(state);
|
|
return {
|
|
firstName: user.first_name,
|
|
lastName: user.last_name,
|
|
nickname: user.nickname,
|
|
username: user.username,
|
|
showFullName: config.ShowFullName,
|
|
isBot: Boolean(user.is_bot),
|
|
isGuest: isGuest(user),
|
|
isShared: isShared(user),
|
|
theme: getTheme(state),
|
|
isCurrentUser: getCurrentUserId(state) === user.id,
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps)(AtMentionItem);
|