Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

WIP Friend blocking #6623

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Conversation

anthonybilinski
Copy link
Member

@anthonybilinski anthonybilinski commented Apr 9, 2022

TODO:

  • Finish splitting history
  • Reorder history so that each commit in order is functional or at least doesn't expose broken parts to the user.
  • Fix ChatLog races on friend block, when Core removes the friend ID with ChatLog possibly still using that chat ID based on UI actions.

This change is Reviewable

So that chat can be shown for contacts that were removed from toxcore.
For blocked friends that don't exist in toxcore.
Since they aren't stored in toxcore.
Split friend name and status settings to be reused for blocked friends which load them from settings.
* architecturally, reusing ChatForm is racy. It calls getId on Friend in
  many places, and although the UI is disabled when the friend becomes
blocked, if ChatForm is still processing an action then calls getId to
call down to core, that asserts. Additionally Core might have been told
to remove the friend by the time ChatForm calls down. The typing timer
in ChatForm has a much larger race, since it gives many seconds to cause
the issue.
* Normally Core outlives ChatForm entirely, since it's made by Profile
  which outlives all of Widget. So this is a new architectual problem
that Core (effectively) can go away while ChatForm doesn't.
* filtering by blocked
* some widget cleanup
* groupchatform support
@codecov-commenter
Copy link

Codecov Report

Merging #6623 (57f96b4) into master (a300415) will decrease coverage by 0.09%.
The diff coverage is 3.40%.

@@            Coverage Diff             @@
##           master    #6623      +/-   ##
==========================================
- Coverage   11.75%   11.66%   -0.10%     
==========================================
  Files         303      303              
  Lines       20582    20796     +214     
==========================================
+ Hits         2419     2425       +6     
- Misses      18163    18371     +208     
Impacted Files Coverage Δ
src/friendlist.cpp 20.00% <0.00%> (-5.72%) ⬇️
src/friendlist.h 100.00% <ø> (ø)
src/model/chatroom/friendchatroom.cpp 0.00% <0.00%> (ø)
src/model/chatroom/friendchatroom.h 0.00% <ø> (ø)
src/model/friend.h 100.00% <ø> (ø)
src/model/friendlist/friendlistmanager.h 100.00% <ø> (ø)
src/model/friendlist/ifriendlistitem.h 25.00% <ø> (ø)
src/nexus.cpp 0.00% <0.00%> (ø)
src/persistence/ifriendsettings.h 0.00% <ø> (ø)
src/persistence/profile.cpp 0.21% <0.00%> (-0.01%) ⬇️
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a300415...57f96b4. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants