Page MenuHomePhabricator

D9070.diff
No OneTemporary

D9070.diff

diff --git a/native/components/unread-dot.react.js b/native/components/unread-dot.react.js
--- a/native/components/unread-dot.react.js
+++ b/native/components/unread-dot.react.js
@@ -13,18 +13,27 @@
const { unread } = props;
const colors = useColors();
- const unreadDotStyle = React.useMemo(() => {
- return { opacity: unread ? 1 : 0 };
- }, [unread]);
-
- return (
- <View style={unreadDotStyle}>
+ const colorSplotch = React.useMemo(
+ () => (
<ColorSplotch
color={`${colors.listForegroundSecondaryLabel.slice(1)}`}
size="micro"
/>
- </View>
+ ),
+ [colors.listForegroundSecondaryLabel],
+ );
+
+ const unreadDotStyle = React.useMemo(
+ () => ({ opacity: unread ? 1 : 0 }),
+ [unread],
);
+
+ const unreadDot = React.useMemo(
+ () => <View style={unreadDotStyle}>{colorSplotch}</View>,
+ [colorSplotch, unreadDotStyle],
+ );
+
+ return unreadDot;
}
export default UnreadDot;

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 24, 3:21 AM (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2346526
Default Alt Text
D9070.diff (965 B)

Event Timeline