Skip to content

Show poll creator view in timeline #1429

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

Merged
merged 2 commits into from
Sep 26, 2023
Merged

Conversation

julioromano
Copy link

  • Shows edit/end poll buttons when the user is the creator of the poll.
  • Only the end poll button is wired right now as there is no "edit poll" screen yet.

@julioromano julioromano self-assigned this Sep 25, 2023
@julioromano julioromano requested a review from a team as a code owner September 25, 2023 20:36
@julioromano julioromano requested review from bmarty and removed request for a team September 25, 2023 20:36
@julioromano
Copy link
Author

julioromano commented Sep 25, 2023

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Attention: 32 lines in your changes are missing coverage. Please review.

Comparison is base (7464cbb) 58.06% compared to head (54a0d3e) 58.04%.
Report is 2 commits behind head on develop.

❗ Current head 54a0d3e differs from pull request most recent head 7e5ea49. Consider uploading reports for the commit 7e5ea49 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1429      +/-   ##
===========================================
- Coverage    58.06%   58.04%   -0.03%     
===========================================
  Files         1129     1129              
  Lines        29880    29936      +56     
  Branches      6067     6088      +21     
===========================================
+ Hits         17351    17377      +26     
- Misses        9931     9953      +22     
- Partials      2598     2606       +8     
Files Coverage Δ
...es/messages/impl/actionlist/ActionListPresenter.kt 80.55% <ø> (ø)
.../features/messages/impl/timeline/TimelineEvents.kt 100.00% <100.00%> (ø)
...atures/messages/impl/timeline/TimelinePresenter.kt 92.50% <100.00%> (+0.50%) ⬆️
...s/impl/timeline/components/TimelineItemEventRow.kt 61.31% <100.00%> (+0.10%) ⬆️
...l/timeline/components/TimelineItemStateEventRow.kt 78.12% <100.00%> (+0.70%) ⬆️
...meline/components/event/TimelineItemContentView.kt 81.63% <100.00%> (+0.38%) ⬆️
...ndroid/features/poll/api/PollAnswerViewProvider.kt 97.72% <100.00%> (+0.16%) ⬆️
...ndroid/features/messages/impl/MessagesPresenter.kt 82.28% <50.00%> (+0.06%) ⬆️
.../timeline/components/event/TimelineItemPollView.kt 43.33% <41.66%> (-1.12%) ⬇️
...ement/android/features/poll/api/PollContentView.kt 57.79% <35.13%> (-12.07%) ⬇️

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

@julioromano julioromano force-pushed the julioromano/polls_creator_view branch from 57f7b88 to 0a5a068 Compare September 26, 2023 06:40
@github-actions
Copy link
Contributor

github-actions bot commented Sep 26, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/zEBqik

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@@ -216,7 +216,7 @@ class MessagesPresenter @AssistedInject constructor(
TimelineItemAction.ViewSource -> handleShowDebugInfoAction(targetEvent)
TimelineItemAction.Forward -> handleForwardAction(targetEvent)
TimelineItemAction.ReportContent -> handleReportAction(targetEvent)
TimelineItemAction.EndPoll -> handleEndPollAction(targetEvent)
TimelineItemAction.EndPoll -> targetEvent.eventId?.let { timelineState.eventSink(TimelineEvents.PollEndClicked(it)) }
Copy link
Member

Choose a reason for hiding this comment

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

Not a big deal, but I was happy with all the handle* fun :)

Copy link
Author

Choose a reason for hiding this comment

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

You'll soon be happy again

if (!isPollEnded) {
if (votesCount == 0) {
Button(
text = "Edit Poll",
Copy link
Member

Choose a reason for hiding this comment

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

Localazy? Also maybe Edit poll is better, not sure.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for noticing, it's a leftover.

)
} else {
Button(
text = "End Poll",
Copy link
Member

Choose a reason for hiding this comment

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

Localazy? Also maybe End poll is better, not sure.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for noticing, it's a leftover.

Only end poll button is wired right now as there is no "edit poll" screen yet.
@julioromano julioromano force-pushed the julioromano/polls_creator_view branch from 54a0d3e to b4ee302 Compare September 26, 2023 08:40
@julioromano
Copy link
Author

Comments addressed! New screenshots underway.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@julioromano julioromano merged commit 2e6581a into develop Sep 26, 2023
@julioromano julioromano deleted the julioromano/polls_creator_view branch September 26, 2023 09:19
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