@@ -180,14 +180,46 @@ public void UpdatePlayerAndRoomCount(RRLiveRooms sender)
180180
181181 private void UpdateLiveAlert ( WhWzStatusManager sender )
182182 {
183- var visible = sender . Status != null && sender . Status . Variant != WhWzStatusVariant . None ;
183+ var hasVariant = sender . Status ? . Variant != null && sender . Status . Variant != WhWzStatusVariant . None ;
184+ var hasCustomIcon = ! string . IsNullOrEmpty ( sender . Status ? . Icon ) ;
185+ var visible = hasVariant || hasCustomIcon ;
186+
184187 LiveStatusBorder . IsVisible = visible ;
185188 if ( ! visible )
186189 return ;
187190
188191 ToolTip . SetTip ( LiveStatusBorder , sender . Status ! . Message ) ;
189192 LiveStatusBorder . Classes . Clear ( ) ;
190- LiveStatusBorder . Classes . Add ( sender . Status ! . Variant . ToString ( ) ) ;
193+
194+ // If custom icon is provided, use it instead of variant
195+ if ( hasCustomIcon )
196+ {
197+ // Clear any variant-based classes
198+ LiveStatusBorder . Classes . Add ( "Custom" ) ;
199+
200+ // Find the PathIcon in the LiveStatusBorder and update it dynamically
201+ if ( LiveStatusBorder . Child is PathIcon pathIcon )
202+ {
203+ // Parse the SVG path data
204+ var geometry = Geometry . Parse ( sender . Status . Icon ! ) ;
205+ pathIcon . Data = geometry ;
206+
207+ // Apply custom color if provided, otherwise use a default
208+ if ( ! string . IsNullOrEmpty ( sender . Status . Color ) )
209+ {
210+ pathIcon . Foreground = new SolidColorBrush ( Color . Parse ( sender . Status . Color ) ) ;
211+ }
212+ else
213+ {
214+ pathIcon . Foreground = new SolidColorBrush ( Colors . White ) ;
215+ }
216+ }
217+ }
218+ else
219+ {
220+ // Use variant-based styling
221+ LiveStatusBorder . Classes . Add ( sender . Status . Variant . ToString ( ) ! ) ;
222+ }
191223 }
192224
193225 private void TopBar_PointerPressed ( object ? sender , PointerPressedEventArgs e )
0 commit comments