forked from Ivasoft/mattermost-mobile
[Gekidou] [Bug] DM Icon will be 'archive-outline' if user is archived (#6415)
This commit is contained in:
@@ -4,9 +4,10 @@
|
||||
import React from 'react';
|
||||
import {View} from 'react-native';
|
||||
|
||||
import CompassIcon from '@components/compass_icon';
|
||||
import ProfilePicture from '@components/profile_picture';
|
||||
import {useTheme} from '@context/theme';
|
||||
import {makeStyleSheetFromTheme} from '@utils/theme';
|
||||
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
|
||||
|
||||
import type UserModel from '@typings/database/models/servers/user';
|
||||
|
||||
@@ -24,11 +25,29 @@ const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => ({
|
||||
statusInfo: {
|
||||
backgroundColor: theme.centerChannelBg,
|
||||
},
|
||||
icon: {
|
||||
color: changeOpacity(theme.sidebarText, 0.4),
|
||||
left: 1,
|
||||
},
|
||||
iconInfo: {
|
||||
color: changeOpacity(theme.centerChannelColor, 0.72),
|
||||
},
|
||||
}));
|
||||
|
||||
const DmAvatar = ({author, isInfo}: Props) => {
|
||||
const theme = useTheme();
|
||||
const style = getStyleSheet(theme);
|
||||
|
||||
if (author?.deleteAt) {
|
||||
return (
|
||||
<CompassIcon
|
||||
name='archive-outline'
|
||||
style={[style.icon, isInfo && style.iconInfo]}
|
||||
size={24}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={style.container}>
|
||||
<ProfilePicture
|
||||
|
||||
Reference in New Issue
Block a user