@@ -30,7 +30,7 @@ use crate::{
30
30
user_profile:: { AvatarState , ShowUserProfileAction , UserProfile , UserProfileAndRoomId , UserProfilePaneInfo , UserProfileSlidingPaneRef , UserProfileSlidingPaneWidgetExt } ,
31
31
user_profile_cache,
32
32
} , 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
34
34
} , 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 }
35
35
} ;
36
36
use crate :: home:: event_reaction_list:: ReactionListWidgetRefExt ;
@@ -4447,18 +4447,18 @@ fn populate_image_modal(cx: &mut Cx, timer: &mut Timer, mxc_uri: Option<OwnedMxc
4447
4447
} ,
4448
4448
Err ( _) => {
4449
4449
cx. stop_timer ( * timer) ;
4450
- show_state ( cx, view_set, 1 ) ;
4450
+ update_state_views ( cx, view_set, LoadState :: Error ) ;
4451
4451
return LoadState :: Error ;
4452
4452
}
4453
4453
}
4454
4454
}
4455
4455
( MediaCacheEntry :: Requested , _)
4456
4456
| ( MediaCacheEntry :: Loaded ( _) , MediaFormat :: Thumbnail ( _) ) => {
4457
- show_state ( cx, view_set, 0 ) ;
4457
+ update_state_views ( cx, view_set, LoadState :: Loading ) ;
4458
4458
}
4459
4459
( MediaCacheEntry :: Failed , _) => {
4460
4460
cx. stop_timer ( * timer) ;
4461
- show_state ( cx, view_set, 1 ) ;
4461
+ update_state_views ( cx, view_set, LoadState :: Error ) ;
4462
4462
}
4463
4463
}
4464
4464
}
0 commit comments