git.iko.soy/rowtype-yoga/purescript-yoga-react-native
on main help sign in
Replace NSTextView with direct drawRect rendering to fix contentsScale crash
commit996a516fa76394fd977b462255664f9d735c77a2 authorMark <mark.eibes@gmail.com> dateWed 18 Feb 2026, 20:50 (7 months ago) parent43d0bb9
1 file changed+12−19
example-macos/src/Demo/Chat.purs+12−19
example-macos/src/Demo/Chat.purs+12−19
@@ -161,17 +161,17 @@ chatDemo = component "ChatDemo" \dp -> React.do
161161 scrollY /\ setScrollY <- useState' 0.0
162162 scrollTrigger /\ setScrollTrigger <- useState 0
163163 hoveredIdx /\ setHoveredIdx <- useState' (Nothing :: Maybe Int)
164− pickerScale <- R.useSharedValue 0.0
164+ pickerScale <- R.useSharedValue 0.5
165165 pickerOpacity <- R.useSharedValue 0.0
166166 useEffect reactPopover do
167167 case reactPopover of
168168 Just _ -> do
169− R.writeSharedValue pickerScale 0.0
169+ R.writeSharedValue pickerScale 0.5
170170 R.writeSharedValue pickerOpacity 0.0
171171 R.springTo pickerScale 1.0 { stiffness: 500.0, damping: 20.0 }
172172 R.springTo pickerOpacity 1.0 { stiffness: 500.0, damping: 20.0 }
173173 Nothing -> do
174− R.timingTo pickerScale 0.0 { duration: 120.0 }
174+ R.timingTo pickerScale 0.5 { duration: 120.0 }
175175 R.timingTo pickerOpacity 0.0 { duration: 120.0 }
176176 pure (pure unit)
177177 let
@@ -288,22 +288,15 @@ chatDemo = component "ChatDemo" \dp -> React.do
288288 , opacity: pickerOpacity
289289 }
290290 }
291− ( mapWithIndex
292− ( \i emoji ->
293− view
294− { onDoubleClick: handler_ (pure unit)
295− , style: Style.style { marginLeft: if i == 0 then 0.0 else (-2.0) }
296− }
297− [ nativeButton
298− { title: emoji
299− , bezelStyle: T.inline
300− , onPress: reactToMessage idx emoji
301− , style: Style.style { height: 26.0, width: 26.0 }
302− , buttonEnabled: reactPopover == Just idx
303− }
304− ]
305− )
306− reactionEmoji
291+ ( if reactPopover == Just idx then
292+ reactionEmoji <#> \emoji ->
293+ nativeButton
294+ { title: emoji
295+ , bezelStyle: T.inline
296+ , onPress: reactToMessage idx emoji
297+ , style: Style.style { height: 26.0, width: 26.0 }
298+ }
299+ else []
307300 )
308301
309302 replyQuote msg = case msg.replyTo of