Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The bug here was quite simple: the
pop
callback was being invoked with the parent'scontext
.Flutter uses the navigation stack to know what to
pop
. Whenever we invoke it viaNavigator.pop(context)
, it uses thecontext
to derive where in the stack the method is being invoked and act accordingly.By using the wrong
context
, the dialog was not being disposed of, and neither was it returning the value of the confirmation, effectively meaning the user wasn't being blocked.With the changes done here, the feature is back to a working state: user is blocked, their messages being filtered out.
However, as described in #576, I do think that it would be useful to have more control over blocked user management:
What do you think, @MathJud ?
In any case, it's not a blocker to land this fix!
Before
before.mp4
After
after.mp4