-
Notifications
You must be signed in to change notification settings - Fork 499
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
Fetch poll history (PSG-1043) #7293
Conversation
Codecov ReportBase: 11.79% // Head: 11.98% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7293 +/- ##
===========================================
+ Coverage 11.79% 11.98% +0.18%
===========================================
Files 1638 1634 -4
Lines 161160 161354 +194
Branches 65877 66021 +144
===========================================
+ Hits 19010 19333 +323
+ Misses 141503 141377 -126
+ Partials 647 644 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Great work! This feature is looking good 😎
Some minor comments inline for you :)
RiotSwiftUI/Modules/Room/PollHistory/PollHistoryViewModel.swift
Outdated
Show resolved
Hide resolved
RiotSwiftUI/Modules/Room/TimelinePoll/Coordinator/TimelinePollCoordinator.swift
Outdated
Show resolved
Hide resolved
RiotSwiftUI/Modules/Room/PollHistory/Service/PollHistoryServiceProtocol.swift
Outdated
Show resolved
Hide resolved
var updates: AnyPublisher<TimelinePollDetails, Never> { get } | ||
|
||
/// Publishes errors regarding poll aggregations. | ||
/// Note: `next()` will continue to publish new polls even if some poll isn't being aggregated correctly. | ||
var pollErrors: AnyPublisher<Error, Never> { get } |
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 believe in most of places we suffix publisher properties with Publisher
. Can't say I'm particularly fussed about it, but might be nice for consistency.
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 don't think this practice adds value to our codebase. On the contrary increase verbosity.
It would be like suffixing "sequence" every time you have an array (or another Sequence) property.
Also Apple seems not to do that here. 🤔
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.
Yep yep, seeing it in this PR I do agree, the call site looks way nicer without the suffix.
Co-authored-by: Doug <[email protected]>
d0196d7
to
11f605b
Compare
Kudos, SonarCloud Quality Gate passed! |
Description
This PR adds the logic to fetch the polls history in a given room.
The goal is to show polls for the last 30 days in the room.
The already available sdk objects
MXRoomEventTimeline
andPollAggregator
have been used to fetch the polls.Dependency
matrix-org/matrix-ios-sdk#1691
Result