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

day divider: don't assume events have event id #3268

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Mar 22, 2024

Local echoes (which haven't received a remote echo yet) can have no event id, so when computing the report, don't unwrap the event id but use a sensible default instead.

Also tweaks comments from a previous version of another PR. And rename DayDividerAdjuster::maybe_adjust_day_dividers to run.

Local echoes (which haven't received a remote echo yet) can have no event id, so when computing the report, don't unwrap the event id but use a sensible
default instead.

Also tweaks comments from a previous version of another PR. And rename `DayDividerAdjuster::maybe_adjust_day_dividers` to `run`.
@bnjbvr bnjbvr requested a review from a team as a code owner March 22, 2024 14:01
@bnjbvr bnjbvr requested review from Hywan, a team and poljar and removed request for a team and Hywan March 22, 2024 14:01
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 18.75000% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 83.62%. Comparing base (6aee1f6) to head (bfaa862).

Files Patch % Lines
crates/matrix-sdk-ui/src/timeline/day_dividers.rs 13.33% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3268      +/-   ##
==========================================
- Coverage   83.62%   83.62%   -0.01%     
==========================================
  Files         239      239              
  Lines       24703    24705       +2     
==========================================
  Hits        20659    20659              
- Misses       4044     4046       +2     

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

@poljar
Copy link
Contributor

poljar commented Mar 22, 2024

I wish we could forbid unwraps in non-test code 😢.

@bnjbvr bnjbvr merged commit 56f4b3e into main Mar 22, 2024
35 checks passed
@bnjbvr bnjbvr deleted the day-divider-dont-assume-event-id branch March 22, 2024 16:00
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