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

ffi: add RoomPinnedEventsChange enum and a diffing step #3801

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

jmartinesp
Copy link
Contributor

This is needed to give the clients some context of what happened in the last pinning/unpinning events action so they can display the right info in the timeline events.

  • Public API changes documented in changelogs (optional)

Signed-off-by:

@jmartinesp jmartinesp requested a review from a team as a code owner August 5, 2024 08:34
@jmartinesp jmartinesp requested review from andybalaam and removed request for a team August 5, 2024 08:34
@jmartinesp jmartinesp force-pushed the jme/feat/message-pinning-contents-diff branch 2 times, most recently from 823e3e0 to bbcf922 Compare August 5, 2024 09:05
Copy link

codecov bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.09%. Comparing base (91c10ae) to head (cf28c8e).
Report is 1 commits behind head on main.

Files Patch % Lines
...i/src/timeline/event_item/content/pinned_events.rs 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3801      +/-   ##
==========================================
+ Coverage   84.08%   84.09%   +0.01%     
==========================================
  Files         262      263       +1     
  Lines       27456    27476      +20     
==========================================
+ Hits        23087    23107      +20     
  Misses       4369     4369              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion that you can consider optional. Thanks!

@@ -381,7 +394,49 @@ impl From<&matrix_sdk_ui::timeline::AnyOtherFullStateEventContent> for OtherStat
};
Self::RoomName { name }
}
Content::RoomPinnedEvents(_) => Self::RoomPinnedEvents,
Content::RoomPinnedEvents(c) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a massive chunk, which I'd prefer to have in a separate function, and unit tested, if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's probably a good idea. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…pened in the last pinning/unpinning events action
@jmartinesp jmartinesp force-pushed the jme/feat/message-pinning-contents-diff branch from a9bdcd5 to 665c2c2 Compare August 6, 2024 07:46
@jmartinesp jmartinesp requested a review from andybalaam August 6, 2024 07:52
Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you! Just need to add a copyright notice to the new file.

@@ -0,0 +1,178 @@
use std::collections::HashSet;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing copyright.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, weird. I expected the IDE to automatically add it 🤔 .

@jmartinesp jmartinesp force-pushed the jme/feat/message-pinning-contents-diff branch from 665c2c2 to cf28c8e Compare August 6, 2024 08:22
@jmartinesp jmartinesp enabled auto-merge (rebase) August 6, 2024 08:26
@jmartinesp jmartinesp merged commit c83fa3a into main Aug 6, 2024
40 checks passed
@jmartinesp jmartinesp deleted the jme/feat/message-pinning-contents-diff branch August 6, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants