()
| 294 | // the ScrollBox region. CompanionSprite owns the clear-after-10s timer; this |
| 295 | // just reads companionReaction and renders the fade. |
| 296 | export function CompanionFloatingBubble() { |
| 297 | const $ = _c(8); |
| 298 | const reaction = useAppState(_temp); |
| 299 | let t0; |
| 300 | if ($[0] !== reaction) { |
| 301 | t0 = { |
| 302 | tick: 0, |
| 303 | forReaction: reaction |
| 304 | }; |
| 305 | $[0] = reaction; |
| 306 | $[1] = t0; |
| 307 | } else { |
| 308 | t0 = $[1]; |
| 309 | } |
| 310 | const [t1, setTick] = useState(t0); |
| 311 | const { |
| 312 | tick, |
| 313 | forReaction |
| 314 | } = t1; |
| 315 | if (reaction !== forReaction) { |
| 316 | setTick({ |
| 317 | tick: 0, |
| 318 | forReaction: reaction |
| 319 | }); |
| 320 | } |
| 321 | let t2; |
| 322 | let t3; |
| 323 | if ($[2] !== reaction) { |
| 324 | t2 = () => { |
| 325 | if (!reaction) { |
| 326 | return; |
| 327 | } |
| 328 | const timer = setInterval(_temp3, TICK_MS, setTick); |
| 329 | return () => clearInterval(timer); |
| 330 | }; |
| 331 | t3 = [reaction]; |
| 332 | $[2] = reaction; |
| 333 | $[3] = t2; |
| 334 | $[4] = t3; |
| 335 | } else { |
| 336 | t2 = $[3]; |
| 337 | t3 = $[4]; |
| 338 | } |
| 339 | useEffect(t2, t3); |
| 340 | if (!feature("BUDDY") || !reaction) { |
| 341 | return null; |
| 342 | } |
| 343 | const companion = getCompanion(); |
| 344 | if (!companion || getGlobalConfig().companionMuted) { |
| 345 | return null; |
| 346 | } |
| 347 | const t4 = tick >= BUBBLE_SHOW - FADE_WINDOW; |
| 348 | let t5; |
| 349 | if ($[5] !== reaction || $[6] !== t4) { |
| 350 | t5 = <SpeechBubble text={reaction} color={RARITY_COLORS[companion.rarity]} fading={t4} tail="down" />; |
| 351 | $[5] = reaction; |
| 352 | $[6] = t4; |
| 353 | $[7] = t5; |
nothing calls this directly
no test coverage detected