@@ -30,7 +30,7 @@ use crate::{
3030 user_profile:: { AvatarState , ShowUserProfileAction , UserProfile , UserProfileAndRoomId , UserProfilePaneInfo , UserProfileSlidingPaneRef , UserProfileSlidingPaneWidgetExt } ,
3131 user_profile_cache,
3232 } , shared:: {
33- avatar:: AvatarWidgetRefExt , callout_tooltip:: TooltipAction , html_or_plaintext:: { HtmlOrPlaintextRef , HtmlOrPlaintextWidgetRefExt , RobrixHtmlLinkAction } , image_viewer_modal:: { get_global_image_viewer_modal, load_image_data, show_state , LoadState , IMAGE_LOAD_TIMEOUT } , jump_to_bottom_button:: { JumpToBottomButtonWidgetExt , UnreadMessageCount } , popup_list:: { enqueue_popup_notification, PopupItem , PopupKind } , restore_status_view:: RestoreStatusViewWidgetExt , styles:: COLOR_FG_DANGER_RED , text_or_image:: { TextOrImageAction , TextOrImageRef , TextOrImageWidgetRefExt } , timestamp:: TimestampWidgetRefExt , typing_animation:: TypingAnimationWidgetExt
33+ avatar:: AvatarWidgetRefExt , callout_tooltip:: TooltipAction , html_or_plaintext:: { HtmlOrPlaintextRef , HtmlOrPlaintextWidgetRefExt , RobrixHtmlLinkAction } , image_viewer_modal:: { get_global_image_viewer_modal, load_image_data, update_state_views , LoadState , IMAGE_LOAD_TIMEOUT } , jump_to_bottom_button:: { JumpToBottomButtonWidgetExt , UnreadMessageCount } , popup_list:: { enqueue_popup_notification, PopupItem , PopupKind } , restore_status_view:: RestoreStatusViewWidgetExt , styles:: COLOR_FG_DANGER_RED , text_or_image:: { TextOrImageAction , TextOrImageRef , TextOrImageWidgetRefExt } , timestamp:: TimestampWidgetRefExt , typing_animation:: TypingAnimationWidgetExt
3434 } , sliding_sync:: { get_client, submit_async_request, take_timeline_endpoints, BackwardsPaginateUntilEventRequest , MatrixRequest , PaginationDirection , TimelineRequestSender , UserPowerLevels } , utils:: { self , room_name_or_id, unix_time_millis_to_datetime, ImageFormat , MEDIA_THUMBNAIL_FORMAT }
3535} ;
3636use crate :: home:: event_reaction_list:: ReactionListWidgetRefExt ;
@@ -4447,18 +4447,18 @@ fn populate_image_modal(cx: &mut Cx, timer: &mut Timer, mxc_uri: Option<OwnedMxc
44474447 } ,
44484448 Err ( _) => {
44494449 cx. stop_timer ( * timer) ;
4450- show_state ( cx, view_set, 1 ) ;
4450+ update_state_views ( cx, view_set, LoadState :: Error ) ;
44514451 return LoadState :: Error ;
44524452 }
44534453 }
44544454 }
44554455 ( MediaCacheEntry :: Requested , _)
44564456 | ( MediaCacheEntry :: Loaded ( _) , MediaFormat :: Thumbnail ( _) ) => {
4457- show_state ( cx, view_set, 0 ) ;
4457+ update_state_views ( cx, view_set, LoadState :: Loading ) ;
44584458 }
44594459 ( MediaCacheEntry :: Failed , _) => {
44604460 cx. stop_timer ( * timer) ;
4461- show_state ( cx, view_set, 1 ) ;
4461+ update_state_views ( cx, view_set, LoadState :: Error ) ;
44624462 }
44634463 }
44644464 }
0 commit comments