This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,28 @@
// Metro module 15194 (f15195).
import { View } from "react-native";
import LocaleStore from "../../user_settings/LocaleStore";
import { createStyles } from "../../../design/components/Styles/native/createStyles";
import { useStateFromStores } from "../../../_bundle/defaultAreStatesEqual";
import MentionsBadge from "./MentionsBadge";
import NewBadge from "../../channel_list_v2/native/components/NewBadge";
import { Text } from "../../../design/components/Text/native/Text";
import { humanizeValue } from "../../../utils/NumberUtils";
const useStyles = createStyles(() => ({
channelInfoContainer: {
paddingStart: 4
}
}));
export default function ChannelBadge(props) {
const { mentionCount, isMentionLowImportance, isNewChannel, postsWithUnreadsCount, muted } = props;
const styles = useStyles();
const stateFromStores = useStateFromStores([LocaleStore], () => LocaleStore.locale);
return mentionCount != null && mentionCount > 0 ? <View style={styles.channelInfoContainer}>
<MentionsBadge mentionsCount={mentionCount} isMentionLowImportance={isMentionLowImportance} />
</View> : isNewChannel ? <View style={styles.channelInfoContainer}>
<NewBadge />
</View> : muted != null ? muted ? null : postsWithUnreadsCount != null ? postsWithUnreadsCount > 0 ? <View style={styles.channelInfoContainer}>
<Text variant="text-xs/semibold" color="text-muted">
{humanizeValue(postsWithUnreadsCount, stateFromStores)}
</Text>
</View> : null : null : null;
};