Skip to content

Commit

Permalink
(#437) users: update application
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Oct 27, 2024
1 parent 89e39a1 commit 76300bf
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,28 @@ public async Task HandleAsync(UpdateUserSettings command, CancellationToken canc
Enum.Parse<Visibility>(command.ConnectionVisibility, true),
Enum.Parse<Visibility>(command.FollowersVisibility, true),
Enum.Parse<Visibility>(command.FollowingVisibility, true),
Enum.Parse<Visibility>(command.FriendListVisibility, true),
Enum.Parse<Visibility>(command.FollowersListVisibility, true),
Enum.Parse<Visibility>(command.FollowingListVisibility, true),
Enum.Parse<Visibility>(command.MyPostsVisibility, true),
Enum.Parse<Visibility>(command.ConnectionsPostsVisibility, true),
Enum.Parse<Visibility>(command.MyRepostsVisibility, true),
Enum.Parse<Visibility>(command.RepostsOfMyConnectionsVisibility, true),
Enum.Parse<Visibility>(command.OrganizationIAmCreatorVisibility, true),
Enum.Parse<Visibility>(command.OrganizationIFollowVisibility, true),

Enum.Parse<Visibility>(command.IsOnlineVisibility, true),
Enum.Parse<Visibility>(command.DeviceTypeVisibility, true),
Enum.Parse<Visibility>(command.LastActiveVisibility, true),
Enum.Parse<Visibility>(command.CountryVisibility, true),
Enum.Parse<Visibility>(command.CityVisibility, true)
Enum.Parse<Visibility>(command.CityVisibility, true),
Enum.Parse<Visibility>(command.MessageVisibility, true),
Enum.Parse<Visibility>(command.ProfileVisibility, true),
Enum.Parse<Visibility>(command.PostCommentVisibility, true),
Enum.Parse<Visibility>(command.PostLikeVisibility, true),
Enum.Parse<Visibility>(command.FriendRequestVisibility, true),
Enum.Parse<Visibility>(command.TaggedPostVisibility, true),
Enum.Parse<Visibility>(command.StoryVisibility, true),
Enum.Parse<Visibility>(command.GroupMembershipVisibility, true)
);

userSettings.UpdateSettings(availableSettings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ public class UpdateUserSettings : ICommand
public string ProfileImageVisibility { get; set; }
public string BannerImageVisibility { get; set; }
public string GalleryVisibility { get; set; }

public string ConnectionVisibility { get; set; }
public string FollowersVisibility { get; set; }
public string FollowingVisibility { get; set; }
public string FriendListVisibility { get; set; }
public string FollowersListVisibility { get; set; }
public string FollowingListVisibility { get; set; }
public string MyPostsVisibility { get; set; }
public string ConnectionsPostsVisibility { get; set; }
public string MyRepostsVisibility { get; set; }
Expand All @@ -40,20 +43,30 @@ public class UpdateUserSettings : ICommand
public string PreferredLanguage { get; set; }
public string FrontendVersion { get; set; }

public UpdateUserSettings(Guid studentId, string createdAtVisibility, string dateOfBirthVisibility,
string interestedInEventsVisibility, string signedUpEventsVisibility,
string educationVisibility, string workPositionVisibility,
string languagesVisibility, string interestsVisibility,
string contactEmailVisibility, string phoneNumberVisibility,
string profileImageVisibility, string bannerImageVisibility,
string galleryVisibility, string preferredLanguage, string frontendVersion,
string connectionVisibility, string followersVisibility,
string followingVisibility, string myPostsVisibility,
string connectionsPostsVisibility, string myRepostsVisibility,
string repostsOfMyConnectionsVisibility,
string organizationIAmCreatorVisibility, string organizationIFollowVisibility,
string isOnlineVisibility, string deviceTypeVisibility, string lastActiveVisibility,
string countryVisibility, string cityVisibility)
public string MessageVisibility { get; set; }
public string ProfileVisibility { get; set; }
public string PostCommentVisibility { get; set; }
public string PostLikeVisibility { get; set; }
public string FriendRequestVisibility { get; set; }
public string TaggedPostVisibility { get; set; }
public string StoryVisibility { get; set; }
public string GroupMembershipVisibility { get; set; }

public UpdateUserSettings(
Guid studentId, string createdAtVisibility, string dateOfBirthVisibility, string interestedInEventsVisibility,
string signedUpEventsVisibility, string educationVisibility, string workPositionVisibility,
string languagesVisibility, string interestsVisibility, string contactEmailVisibility,
string phoneNumberVisibility, string profileImageVisibility, string bannerImageVisibility,
string galleryVisibility, string preferredLanguage, string frontendVersion,
string connectionVisibility, string followersVisibility, string followingVisibility,
string friendListVisibility, string followersListVisibility, string followingListVisibility,
string myPostsVisibility, string connectionsPostsVisibility, string myRepostsVisibility,
string repostsOfMyConnectionsVisibility, string organizationIAmCreatorVisibility,
string organizationIFollowVisibility, string isOnlineVisibility, string deviceTypeVisibility,
string lastActiveVisibility, string countryVisibility, string cityVisibility,
string messageVisibility, string profileVisibility, string postCommentVisibility,
string postLikeVisibility, string friendRequestVisibility, string taggedPostVisibility,
string storyVisibility, string groupMembershipVisibility)
{
StudentId = studentId;
CreatedAtVisibility = createdAtVisibility;
Expand All @@ -73,6 +86,9 @@ public UpdateUserSettings(Guid studentId, string createdAtVisibility, string dat
ConnectionVisibility = connectionVisibility;
FollowersVisibility = followersVisibility;
FollowingVisibility = followingVisibility;
FriendListVisibility = friendListVisibility;
FollowersListVisibility = followersListVisibility;
FollowingListVisibility = followingListVisibility;
MyPostsVisibility = myPostsVisibility;
ConnectionsPostsVisibility = connectionsPostsVisibility;
MyRepostsVisibility = myRepostsVisibility;
Expand All @@ -89,6 +105,15 @@ public UpdateUserSettings(Guid studentId, string createdAtVisibility, string dat

PreferredLanguage = preferredLanguage;
FrontendVersion = frontendVersion;

MessageVisibility = messageVisibility;
ProfileVisibility = profileVisibility;
PostCommentVisibility = postCommentVisibility;
PostLikeVisibility = postLikeVisibility;
FriendRequestVisibility = friendRequestVisibility;
TaggedPostVisibility = taggedPostVisibility;
StoryVisibility = storyVisibility;
GroupMembershipVisibility = groupMembershipVisibility;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,37 @@ public class AvailableSettingsDto
public string ProfileImageVisibility { get; set; }
public string BannerImageVisibility { get; set; }
public string GalleryVisibility { get; set; }

public string ConnectionVisibility { get; set; }
public string FollowersVisibility { get; set; }
public string FollowingVisibility { get; set; }
public string FriendListVisibility { get; set; } // Who can see the user's friend list
public string FollowersListVisibility { get; set; } // Who can see the user's followers list
public string FollowingListVisibility { get; set; } // Who can see the user's following list
public string MyPostsVisibility { get; set; }
public string ConnectionsPostsVisibility { get; set; }
public string MyRepostsVisibility { get; set; }
public string RepostsOfMyConnectionsVisibility { get; set; }
public string OrganizationIAmCreatorVisibility { get; set; }
public string OrganizationIFollowVisibility { get; set; }

public string IsOnlineVisibility { get; set; }
public string DeviceTypeVisibility { get; set; }
public string LastActiveVisibility { get; set; }

public string CountryVisibility { get; set; }
public string CityVisibility { get; set; }

public string PreferredLanguage { get; set; }
public string FrontendVersion { get; set; }

public string MessageVisibility { get; set; } // Who can message the user
public string ProfileVisibility { get; set; } // Overall profile visibility
public string PostCommentVisibility { get; set; } // Who can comment on posts
public string PostLikeVisibility { get; set; } // Who can like posts
public string FriendRequestVisibility { get; set; } // Who can send friend requests
public string TaggedPostVisibility { get; set; } // Who can see posts the user is tagged in
public string StoryVisibility { get; set; } // Who can view stories
public string GroupMembershipVisibility { get; set; } // Who can see the user's group memberships
}
}

0 comments on commit 76300bf

Please sign in to comment.