Skip to content

Commit

Permalink
(#437) users: udpate users available settings
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Oct 18, 2024
1 parent 04983be commit 8e9a5ca
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "MiniSpace.APIGateway.Nuar/src/Nuar"]
path = MiniSpace.APIGateway.Nuar/src/Nuar
url = https://github.com/itsharppro/Nuar.git
[submodule "Paralax"]
path = Paralax
url = https://github.com/itsharppro/Paralax.git
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public class UserAvailableSettings
public Visibility ConnectionVisibility { get; private set; }
public Visibility FollowersVisibility { get; private set; }
public Visibility FollowingVisibility { get; private set; }
public Visibility FriendListVisibility { get; private set; } // Who can see the user's friend list
public Visibility FollowersListVisibility { get; private set; } // Who can see the user's followers list
public Visibility FollowingListVisibility { get; private set; } // Who can see the user's following list
public Visibility MyPostsVisibility { get; private set; }
public Visibility ConnectionsPostsVisibility { get; private set; }
public Visibility MyRepostsVisibility { get; private set; }
Expand All @@ -32,13 +35,23 @@ public class UserAvailableSettings
public Visibility IsOnlineVisibility { get; private set; }
public Visibility DeviceTypeVisibility { get; private set; }
public Visibility LastActiveVisibility { get; private set; }

public Visibility CountryVisibility { get; private set; }
public Visibility CityVisibility { get; private set; }

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

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

public UserAvailableSettings()
{
CreatedAtVisibility = Visibility.Everyone;
Expand All @@ -58,6 +71,9 @@ public UserAvailableSettings()
ConnectionVisibility = Visibility.Everyone;
FollowersVisibility = Visibility.Everyone;
FollowingVisibility = Visibility.Everyone;
FriendListVisibility = Visibility.Everyone; // Default friend list visibility
FollowersListVisibility = Visibility.Everyone; // Default followers list visibility
FollowingListVisibility = Visibility.Everyone; // Default following list visibility
MyPostsVisibility = Visibility.Everyone;
ConnectionsPostsVisibility = Visibility.Everyone;
MyRepostsVisibility = Visibility.Everyone;
Expand All @@ -74,6 +90,16 @@ public UserAvailableSettings()

FrontendVersion = FrontendVersion.Default;
PreferredLanguage = PreferredLanguage.English;

MessageVisibility = Visibility.Everyone;
ProfileVisibility = Visibility.Everyone;
PostCommentVisibility = Visibility.Everyone;
PostLikeVisibility = Visibility.Everyone;
FriendRequestVisibility = Visibility.Everyone;
TaggedPostVisibility = Visibility.Everyone;
StoryVisibility = Visibility.Everyone;
GroupMembershipVisibility = Visibility.Everyone;
BlockedUsersVisibility = false; // Default blocked users visibility
}

public UserAvailableSettings(Visibility createdAtVisibility, Visibility dateOfBirthVisibility, Visibility interestedInEventsVisibility,
Expand All @@ -82,9 +108,10 @@ public UserAvailableSettings(Visibility createdAtVisibility, Visibility dateOfBi
Visibility phoneNumberVisibility, Visibility profileImageVisibility, Visibility bannerImageVisibility,
Visibility galleryVisibility, FrontendVersion frontendVersion, PreferredLanguage preferredLanguage,
Visibility connectionVisibility, Visibility followersVisibility, Visibility followingVisibility,
Visibility friendListVisibility, Visibility followersListVisibility, Visibility followingListVisibility,
Visibility myPostsVisibility, Visibility connectionsPostsVisibility, Visibility myRepostsVisibility,
Visibility repostsOfMyConnectionsVisibility, Visibility organizationIAmCreatorVisibility,
Visibility organizationIFollowVisibility, Visibility isOnlineVisibility, Visibility deviceTypeVisibility,
Visibility organizationIFollowVisibility, Visibility isOnlineVisibility, Visibility deviceTypeVisibility,
Visibility lastActiveVisibility, Visibility countryVisibility, Visibility cityVisibility)
{
CreatedAtVisibility = createdAtVisibility;
Expand All @@ -104,6 +131,9 @@ public UserAvailableSettings(Visibility createdAtVisibility, Visibility dateOfBi
ConnectionVisibility = connectionVisibility;
FollowersVisibility = followersVisibility;
FollowingVisibility = followingVisibility;
FriendListVisibility = friendListVisibility;
FollowersListVisibility = followersListVisibility;
FollowingListVisibility = followingListVisibility;
MyPostsVisibility = myPostsVisibility;
ConnectionsPostsVisibility = connectionsPostsVisibility;
MyRepostsVisibility = myRepostsVisibility;
Expand All @@ -120,6 +150,16 @@ public UserAvailableSettings(Visibility createdAtVisibility, Visibility dateOfBi

FrontendVersion = frontendVersion;
PreferredLanguage = preferredLanguage;

MessageVisibility = Visibility.Everyone;
ProfileVisibility = Visibility.Everyone;
PostCommentVisibility = Visibility.Everyone;
PostLikeVisibility = Visibility.Everyone;
FriendRequestVisibility = Visibility.Everyone;
TaggedPostVisibility = Visibility.Everyone;
StoryVisibility = Visibility.Everyone;
GroupMembershipVisibility = Visibility.Everyone;
BlockedUsersVisibility = false; // Default blocked users visibility
}

public void UpdateSettings(Visibility createdAtVisibility, Visibility dateOfBirthVisibility, Visibility interestedInEventsVisibility,
Expand All @@ -128,6 +168,7 @@ public void UpdateSettings(Visibility createdAtVisibility, Visibility dateOfBirt
Visibility phoneNumberVisibility, Visibility profileImageVisibility, Visibility bannerImageVisibility,
Visibility galleryVisibility, FrontendVersion frontendVersion, PreferredLanguage preferredLanguage,
Visibility connectionVisibility, Visibility followersVisibility, Visibility followingVisibility,
Visibility friendListVisibility, Visibility followersListVisibility, Visibility followingListVisibility,
Visibility myPostsVisibility, Visibility connectionsPostsVisibility, Visibility myRepostsVisibility,
Visibility repostsOfMyConnectionsVisibility, Visibility organizationIAmCreatorVisibility,
Visibility organizationIFollowVisibility, Visibility isOnlineVisibility, Visibility deviceTypeVisibility,
Expand All @@ -150,6 +191,9 @@ public void UpdateSettings(Visibility createdAtVisibility, Visibility dateOfBirt
ConnectionVisibility = connectionVisibility;
FollowersVisibility = followersVisibility;
FollowingVisibility = followingVisibility;
FriendListVisibility = friendListVisibility;
FollowersListVisibility = followersListVisibility;
FollowingListVisibility = followingListVisibility;
MyPostsVisibility = myPostsVisibility;
ConnectionsPostsVisibility = connectionsPostsVisibility;
MyRepostsVisibility = myRepostsVisibility;
Expand Down
1 change: 1 addition & 0 deletions Paralax
Submodule Paralax added at 02e320

0 comments on commit 8e9a5ca

Please sign in to comment.