-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[MBL-1095] Disable Message Reply Button When User Is Blocked #1905
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1905 +/- ##
=======================================
Coverage 83.75% 83.75%
=======================================
Files 1229 1229
Lines 111842 111870 +28
Branches 29749 29752 +3
=======================================
+ Hits 93670 93696 +26
- Misses 17147 17149 +2
Partials 1025 1025 ☔ View full report in Codecov by Sentry. |
* keeps users from quick tapping Reply while the messages/project load
b9d6e6f
to
7aa3bf3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a split second where users can tap Reply while we're pulling messages and project data. Defaulting the reply button's enabled prop to false instead, so users can't do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I added a comment about the participantPreviouslyBlocked
signal, which I think should be fixed, but I don't mind if that happens in a later PR instead.
self.replyButtonIsEnabled = Signal.merge( | ||
self.viewDidLoadProperty.signal.mapConst(false), | ||
self.participantPreviouslyBlocked = self.project | ||
.map { $0.creator.isBlocked } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, kind of out of scope: It feels risky to me to check creator here instead of participant, since theoretically the creator could be the person doing the messaging. Right now, I don't think that's possible (since those messages don't show in the inbox on mobile), but that could (and maybe should) change in the future.
📲 What
Disables the Reply bar button in message threads if the message participant has been blocked.
If we don't think this should go out with 5.11.0 I can avoid cutting a new build and this can go out in the next release. I think we can get it in though.
🤔 Why
We'll be stopping communication between users when one has been blocked.
🛠 How
MessagesViewModel has a
replyButtonIsEnabled
signal that I've updated to emittrue
only when there are messages and the participant isn't blocked.✅ Acceptance criteria