| | |
| | | .join("|"), |
| | | [deps.markers] |
| | | ); |
| | | /** |
| | | * 触发一次 customCallout 回流重绘:翻转 borderRadius 兜底原生地图对该 cover-view 的重绘。 |
| | | */ |
| | | const toggleCalloutRepaint = useCallback(() => { |
| | | setCalloutRepaintStyle((prev) => ({ borderRadius: prev.borderRadius === '0px' ? '0.5px' : '0px' })); |
| | | }, []); |
| | |
| | | toggleCalloutRepaint(); |
| | | return undefined; |
| | | }, [deps.elapsedSeconds, deps.tripStatus, deps.isAndroid, toggleCalloutRepaint]); |
| | | |
| | | /** |
| | | * Android 接驾到达态(VehicleArrivedPickup)上车点倒计时气泡(site-countdown-callout) |
| | | * 同样存在偶现不绘制、倒计时文案不刷新的问题:pickupCountdownSeconds 按秒递减更新, |
| | | * 但此前只有 Publishing/CallingCar 的 elapsedSeconds 变化会触发每秒重绘兜底, |
| | | * VehicleArrivedPickup 未被覆盖,导致该气泡文案长时间卡住不变,直到其他依赖 |
| | | * (markers/tripStatus 等)触发的单次重绘才一次性跳变。这里单独为该状态按秒重绘兜底。 |
| | | */ |
| | | useEffect(() => { |
| | | if (!deps.isAndroid) { |
| | | return undefined; |
| | | } |
| | | if (deps.tripStatus !== TripStatus.VehicleArrivedPickup) { |
| | | return undefined; |
| | | } |
| | | if (pickupCountdownSeconds === null || pickupCountdownSeconds === undefined) { |
| | | return undefined; |
| | | } |
| | | toggleCalloutRepaint(); |
| | | return undefined; |
| | | }, [pickupCountdownSeconds, deps.tripStatus, deps.isAndroid, toggleCalloutRepaint]); |
| | | |
| | | |
| | | |
| | |
| | | {item.id === 1 && |
| | | deps.tripStatus === TripStatus.VehicleApproaching && |
| | | !deps.isModifyDestinationReviewVisible && |
| | | !deps.isPickupRouteChangeVisible && |
| | | !item.hideNameCallout && ( |
| | | <> |
| | | <CoverView |
| | |
| | | {item.id === 1 && |
| | | ([TripStatus.TripFinished, TripStatus.PaymentSuccess].includes( |
| | | deps.tripStatus |
| | | ) || deps.isModifyDestinationReviewVisible) && |
| | | ) || deps.isModifyDestinationReviewVisible |
| | | || (deps.tripStatus === TripStatus.VehicleApproaching && deps.isPickupRouteChangeVisible)) && |
| | | !item.hideNameCallout && ( |
| | | <CoverImage |
| | | className="site-status-end-img" |