Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3049282
D9070.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
965 B
Referenced Files
None
Subscribers
None
D9070.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D9070: [native] Add some memoization to `UnreadDot`
Attached
Detach File
Event Timeline
Log In to Comment