-
Notifications
You must be signed in to change notification settings - Fork 357
Spaces: Add support for getting a flattened list of editable spaces. #5897
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I'm open to naming suggestions as I wasn't massively confident on what to call this (and the matrix_sdk) function.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5897 +/- ##
==========================================
+ Coverage 88.65% 88.66% +0.01%
==========================================
Files 362 362
Lines 103146 103292 +146
Branches 103146 103292 +146
==========================================
+ Hits 91440 91584 +144
- Misses 7458 7459 +1
- Partials 4248 4249 +1 ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #5897 will not alter performanceComparing Summary
|
6807e50 to
e4b17ad
Compare
poljar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good, I think I found a bit of a better name for this function.
Let me know what you think.
| /// | ||
| /// Note: Unlike [`Self::joined_spaces()`], this method does not recompute | ||
| /// graph, nor does it notify subscribers about changes. | ||
| pub async fn all_editable_joined_spaces(&self) -> Vec<SpaceRoom> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One way to make this name a bit more pleasant is to remove the all prefix, and the joined nominator.
I think it's a given that you can only edit joined spaces or rooms for that matter.
So editable_spaces() sounds more palatable to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a given that you can only edit joined spaces or rooms for that matter.
Oh yeah good point, totally missed that fact 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e4b17ad to
61dbc07
Compare
This PR makes 2 changes:
add_space_roomsfunction instead of having 3 variants.SpaceServiceto get all of the user's joined spaces where they have the power to edit the spaces' children.