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

Fix a potential race condition when redacting a message. #3061

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

pixlwave
Copy link
Member

The fix is in the second commit of the PR (and matches how we fetch the item to put into the action menu). The first commit is after discussing and discovering with @stefanceriu that the menu was updating as the item updated, but wasn't updating its ID. We decided it would be better to not automatically update the menu if the item changes, the user will be able to see that the message wasn't sent when long pressing it.

pixlwave added 2 commits July 18, 2024 14:28
- Move it into its own struct.
- Use an item, not an ID so it doesn't randomly change.
- Move permissions into the room screen view model.
Just like we do when fetching the item in the actions menu.
@pixlwave pixlwave added the pr-bugfix for bug fix label Jul 18, 2024
@pixlwave pixlwave requested a review from a team as a code owner July 18, 2024 13:32
@pixlwave pixlwave requested review from Velin92 and removed request for a team July 18, 2024 13:32
Copy link

Warnings
⚠️ Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.
⚠️ You seem to have made changes to views. Please consider adding screenshots.

Generated by 🚫 Danger Swift against d0de242

Copy link

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 37.37864% with 129 lines in your changes missing coverage. Please review.

Project coverage is 77.33%. Comparing base (2fb7f65) to head (d0de242).

Files Patch % Lines
...View/ItemMenu/TimelineItemMenuActionProvider.swift 0.00% 78 Missing ⚠️
...mScreen/View/ItemMenu/TimelineItemMenuAction.swift 56.79% 35 Missing ⚠️
...urces/Screens/RoomScreen/RoomScreenViewModel.swift 75.00% 6 Missing ⚠️
...X/Sources/Screens/RoomScreen/View/RoomScreen.swift 0.00% 6 Missing ⚠️
...een/View/ItemMenu/TimelineItemMacContextMenu.swift 0.00% 2 Missing ⚠️
...een/View/Style/TimelineItemBubbledStylerView.swift 85.71% 1 Missing ⚠️
...eline/TimelineItems/RoomTimelineItemProtocol.swift 75.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3061      +/-   ##
===========================================
- Coverage    77.84%   77.33%   -0.51%     
===========================================
  Files          694      699       +5     
  Lines        54099    54396     +297     
===========================================
- Hits         42112    42066      -46     
- Misses       11987    12330     +343     
Flag Coverage Δ
unittests 68.57% <37.37%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@pixlwave pixlwave merged commit 6339fe2 into develop Jul 18, 2024
12 checks passed
@pixlwave pixlwave deleted the doug/timeline-item-actions branch July 18, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix for bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants