Skip to content

Commit

Permalink
refactor: Rename add_or_update_event to add_or_update_remote_event.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Dec 2, 2024
1 parent 51cfaaa commit 80a48f5
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions crates/matrix-sdk-ui/src/timeline/controller/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,12 @@ impl TimelineStateTransaction<'_> {
visible: false,
};
let _event_added_or_updated = self
.add_or_update_event(event_meta, position, room_data_provider, settings)
.add_or_update_remote_event(
event_meta,
position,
room_data_provider,
settings,
)
.await;

return HandleEventResult::default();
Expand All @@ -564,7 +569,12 @@ impl TimelineStateTransaction<'_> {
visible: false,
};
let _event_added_or_updated = self
.add_or_update_event(event_meta, position, room_data_provider, settings)
.add_or_update_remote_event(
event_meta,
position,
room_data_provider,
settings,
)
.await;
}

Expand All @@ -583,8 +593,9 @@ impl TimelineStateTransaction<'_> {
visible: should_add,
};

let event_added_or_updated =
self.add_or_update_event(event_meta, position, room_data_provider, settings).await;
let event_added_or_updated = self
.add_or_update_remote_event(event_meta, position, room_data_provider, settings)
.await;

// If the event has not been added or updated, it's because it's a duplicated
// event. Let's return early.
Expand Down Expand Up @@ -686,7 +697,7 @@ impl TimelineStateTransaction<'_> {
/// It returns `true` if the event has been added or updated, `false`
/// otherwise. The latter happens if the event already exists, i.e. if
/// an existing event is requested to be added.
async fn add_or_update_event<P: RoomDataProvider>(
async fn add_or_update_remote_event<P: RoomDataProvider>(
&mut self,
event_meta: FullEventMeta<'_>,
position: TimelineItemPosition,
Expand Down

0 comments on commit 80a48f5

Please sign in to comment.