Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk): Improve RoomEventCacheUpdate #3471

Merged

Commits on May 27, 2024

  1. chore(sdk): Rename RoomEventCacheUpdate::UpdateReadMarker.

    This patch renames `RoomEventCacheUpdate::UpdateReadMarker` to
    `ReadMarker`. The `Update` prefix is already part of the enum name.
    Hywan committed May 27, 2024
    Configuration menu
    Copy the full SHA
    dd44212 View commit details
    Browse the repository at this point in the history
  2. feat(sdk): Rename RoomEventCacheUpdate::ReadMarker::event_id to `mo…

    …ve_to`.
    
    This patch renames `RoomEventCacheUpdate::ReadMarker::event_id` to
    `ReadMarker::move_to` as I feel like it conveys a better semantics.
    Hywan committed May 27, 2024
    Configuration menu
    Copy the full SHA
    575d42b View commit details
    Browse the repository at this point in the history
  3. feat(sdk): Extract RoomEventCacheUpdate::Append::ambiguity_changes.

    This patch extracts `RoomEventCacheUpdate::Append::ambiguity_changes`
    into a new variant `RoomEventCacheUpdate::Members { ambiguity_changes }
    `.
    
    This patch also creates a new private
    `RoomEventCacheInner::send_grouped_updates_for_events` method to ensure
    the updates are sent in a particular order.
    Hywan committed May 27, 2024
    Configuration menu
    Copy the full SHA
    ab102ae View commit details
    Browse the repository at this point in the history
  4. feat(sdk): Rename RoomEventCacheUpdate::Append.

    This patch renames `RoomEventCacheUpdate::Append` to `SyncEvents`. The
    field `events` is renamed `timeline`.
    
    This patch also renames some variables to clarify the code and to match
    the renamings in `RoomEventCacheUpdate`.
    Hywan committed May 27, 2024
    Configuration menu
    Copy the full SHA
    84c2c55 View commit details
    Browse the repository at this point in the history
  5. feat(sdk): Rename RoomEventCacheUpdate::ReadMarker and Members.

    This patch renames `ReadMarker { move_to: … }` to `MoveReaderMarkerTo
    { event_id: … }`.
    
    This patch also renames `Members` to `UpdateMembers`.
    
    Finally, this patch renames some other variables to avoid clashes with
    terminology in `matrix_sdk_ui`.
    Hywan committed May 27, 2024
    Configuration menu
    Copy the full SHA
    be22621 View commit details
    Browse the repository at this point in the history
  6. feat(sdk): Split RoomEventCacheUpdate::SyncEvents.

    This patch splits `RoomEventCacheUpdate::SyncEvents` into 2 new variants:
    `AddTimelineEvents` and `AddEphemeralEvents`.
    
    This patch takes this opportunity to update `matrix_sdk_ui::timeline`
    a little bit too. `handle_sync_events` is renamed
    `handle_ephemeral_events`, and the `SyncTimelineEvent` argument is
    removed: it's possible to use `add_events_at` directly to handle the
    `SyncTimelineEvent`s.
    Hywan committed May 27, 2024
    Configuration menu
    Copy the full SHA
    91f04a2 View commit details
    Browse the repository at this point in the history
  7. fix(sdk): Do not send RoomEventCacheUpdate if values are empty.

    This patch prevents sending useless `RoomEventCacheUdpate` if their
    respective values are empty.
    Hywan committed May 27, 2024
    Configuration menu
    Copy the full SHA
    c1805c9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    3b1b893 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2024

  1. Apply suggestions from code review

    Signed-off-by: Benjamin Bouvier <[email protected]>
    bnjbvr authored May 28, 2024
    Configuration menu
    Copy the full SHA
    c362412 View commit details
    Browse the repository at this point in the history
  2. fmt

    bnjbvr committed May 28, 2024
    Configuration menu
    Copy the full SHA
    3a2323d View commit details
    Browse the repository at this point in the history