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

[MBL-1076] Fix v1 user #1902

Merged
merged 3 commits into from
Dec 7, 2023
Merged

[MBL-1076] Fix v1 user #1902

merged 3 commits into from
Dec 7, 2023

Conversation

ifosli
Copy link
Contributor

@ifosli ifosli commented Dec 7, 2023

πŸ“² What

The backend field is isBlocked not is_blocked. This also stops users from blocking themselves.

πŸ‘€ See

Jira

βœ… Acceptance criteria

  • isBlocked is correctly propagated to v1 user objects, particularly in messages.
  • Clicking on the name of a logged in user does not show a "Block user" option.

@ifosli ifosli self-assigned this Dec 7, 2023
@ifosli ifosli added this to the release-5.11.0 milestone Dec 7, 2023
@@ -198,8 +198,14 @@ final class CommentRepliesViewController: UITableViewController, MessageBannerVi
}

private func handleCommentCellHeaderTapped(in cell: UITableViewCell, _ author: Comment.Author) {
guard AppEnvironment.current.currentUser != nil, featureBlockUsersEnabled() else { return }
guard author.isBlocked == false else { return }
guard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably be in a helper func somewhere, it's getting a little long!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I thought about that but I didn't see a nice place to put it. I'm going to just leave this for now so we can move forward with this, but I'll look into/see if Scott has ideas for where this kind of helper code should live.

Copy link
Contributor

@amy-at-kickstarter amy-at-kickstarter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a non-blocking suggestion

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

Comparison is base (38716e0) 83.73% compared to head (eca96f9) 83.72%.

Files Patch % Lines
...nts/Controllers/CommentRepliesViewController.swift 0.00% 7 Missing ⚠️
.../Comments/Controllers/CommentsViewController.swift 0.00% 7 Missing ⚠️
...s/Messages/Controller/MessagesViewController.swift 0.00% 2 Missing ⚠️
...ectPage/Controller/ProjectPageViewController.swift 0.00% 2 Missing ⚠️
KsApi/models/User.swift 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1902      +/-   ##
==========================================
- Coverage   83.73%   83.72%   -0.02%     
==========================================
  Files        1226     1226              
  Lines      111776   111788      +12     
  Branches    29725    29723       -2     
==========================================
- Hits        93598    93596       -2     
- Misses      17161    17175      +14     
  Partials     1017     1017              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@ifosli ifosli merged commit bd02759 into main Dec 7, 2023
7 checks passed
@ifosli ifosli deleted the fixV1User branch December 7, 2023 20:10
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.

3 participants