Skip to content

Commit 46773bb

Browse files
Remove unnecessary format changes
1 parent 3bc82c6 commit 46773bb

File tree

2 files changed

+10
-35
lines changed

2 files changed

+10
-35
lines changed

src/home/room_screen.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3231,7 +3231,7 @@ fn populate_text_message_content(
32313231
};
32323232

32333233
// Populate link previews if all required parameters are provided
3234-
if let (Some(link_preview_ref), Some(media_cache), Some(link_preview_cache)) =
3234+
if let (Some(link_preview_ref), Some(media_cache), Some(link_preview_cache)) =
32353235
(link_preview_ref, media_cache, link_preview_cache)
32363236
{
32373237
link_preview_ref.populate_below_message(
@@ -3331,7 +3331,7 @@ fn populate_image_message_content(
33313331
Err(e) => {
33323332
error!("Failed to decode blurhash {e:?}");
33333333
Err(image_cache::ImageError::EmptyData)
3334-
}
3334+
}
33353335
}
33363336
});
33373337
if let Err(e) = show_image_result {
@@ -4167,7 +4167,7 @@ impl MessageRef {
41674167
///
41684168
/// This function requires passing in a reference to `Cx`,
41694169
/// which isn't used, but acts as a guarantee that this function
4170-
/// must only be called by the main UI thread.
4170+
/// must only be called by the main UI thread.
41714171
pub fn clear_timeline_states(_cx: &mut Cx) {
41724172
// Clear timeline states cache
41734173
TIMELINE_STATES.with_borrow_mut(|states| {

src/sliding_sync.rs

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,41 +29,16 @@ use url::Url;
2929
use std::{cmp::{max, min}, collections::{BTreeMap, BTreeSet}, future::Future, iter::Peekable, ops::{Deref, Not}, path:: Path, sync::{Arc, LazyLock, Mutex}, time::Duration};
3030
use std::io;
3131
use crate::{
32-
app::AppStateAction,
33-
app_data_dir,
34-
avatar_cache::AvatarUpdate,
35-
event_preview::text_preview_of_timeline_item,
36-
home::{
37-
invite_screen::{JoinRoomResultAction, LeaveRoomResultAction},
38-
link_preview::{LinkPreviewData, LinkPreviewDataNonNumeric, LinkPreviewRateLimitResponse},
39-
room_screen::TimelineUpdate,
40-
rooms_list::{
41-
self, InvitedRoomInfo, InviterInfo, JoinedRoomInfo, RoomsListUpdate,
42-
enqueue_rooms_list_update,
43-
},
44-
rooms_list_header::RoomsListHeaderAction,
45-
tombstone_footer::SuccessorRoomDetails,
46-
},
47-
login::login_screen::LoginAction,
48-
logout::{
49-
logout_confirm_modal::LogoutAction,
50-
logout_state_machine::{is_logout_in_progress, logout_with_state_machine, LogoutConfig},
51-
},
52-
media_cache::{MediaCacheEntry, MediaCacheEntryRef},
53-
persistence::{self, ClientSessionPersisted, load_app_state},
54-
profile::{
32+
app::AppStateAction, app_data_dir, avatar_cache::AvatarUpdate, event_preview::text_preview_of_timeline_item, home::{
33+
invite_screen::{JoinRoomResultAction, LeaveRoomResultAction}, link_preview::{LinkPreviewData, LinkPreviewDataNonNumeric, LinkPreviewRateLimitResponse}, room_screen::TimelineUpdate, rooms_list::{self, InvitedRoomInfo, InviterInfo, JoinedRoomInfo, RoomsListUpdate, enqueue_rooms_list_update}, rooms_list_header::RoomsListHeaderAction, tombstone_footer::SuccessorRoomDetails
34+
}, login::login_screen::LoginAction, logout::{logout_confirm_modal::LogoutAction, logout_state_machine::{LogoutConfig, is_logout_in_progress, logout_with_state_machine}}, media_cache::{MediaCacheEntry, MediaCacheEntryRef}, persistence::{self, ClientSessionPersisted, load_app_state}, profile::{
5535
user_profile::{AvatarState, UserProfile},
56-
user_profile_cache::{enqueue_user_profile_update, UserProfileUpdate},
57-
},
58-
room::{FetchedRoomAvatar, FetchedRoomPreview, RoomPreviewAction},
59-
shared::{
36+
user_profile_cache::{UserProfileUpdate, enqueue_user_profile_update},
37+
}, room::{FetchedRoomAvatar, FetchedRoomPreview, RoomPreviewAction}, shared::{
6038
html_or_plaintext::MatrixLinkPillState,
6139
jump_to_bottom_button::UnreadMessageCount,
62-
popup_list::{enqueue_popup_notification, PopupItem, PopupKind}
63-
},
64-
space_service_sync::space_service_loop,
65-
utils::{self, avatar_from_room_name, AVATAR_THUMBNAIL_FORMAT, RoomName},
66-
verification::add_verification_event_handlers_and_sync_client
40+
popup_list::{PopupItem, PopupKind, enqueue_popup_notification}
41+
}, space_service_sync::space_service_loop, utils::{self, AVATAR_THUMBNAIL_FORMAT, RoomName, avatar_from_room_name}, verification::add_verification_event_handlers_and_sync_client
6742
};
6843

6944
#[derive(Parser, Debug, Default)]

0 commit comments

Comments
 (0)