[Gekidou] [Bug] DM Icon will be 'archive-outline' if user is archived (#6415)

This commit is contained in:
Shaz MJ
2022-06-22 08:46:46 +10:00
committed by GitHub
parent b97fd550f1
commit 12e97e49a8

View File

@@ -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