Skip to main content

FriendsRequestsPanel

A class in Root.Township, Alta.Meta.UI.ServerManagement.

Main menu list of friend requests sent to you, with accept and reject options.

Constructors​

MemberWhat it is
FriendsRequestsPanel()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

5 private and internal fields
MemberWhat it is
private IAnalyticsService analyticsServiceAnalytics service for social events.
private TextRenderer emptyListTextText shown when there are no requests.
private PanelComponent friendsListFriends list panel, refreshed after accepting.
private ListElementWithButton listElementRow prefab.
private UIList uiListThe list the rows go in.

Methods​

MemberWhat it is
void Inject(IAnalyticsService analyticsService)Receives the analytics service.
override async void RefreshData()Reloads the list behind a loading screen.
4 private and internal methods
MemberWhat it is
private async void AcceptFriendRequest(FriendshipInfo friendship)Accepts a request, logs analytics, reloads and marks the friends list for refresh.
private async void RejectFriendRequest(FriendshipInfo friendship)Rejects a request by removing the friendship, then reloads.
private async Task SetupFriendsList()Fetches incoming requests from the web API and builds a row for each.
private void ShowOptionsForFriend(FriendshipInfo friendship)Shows the Accept and Reject options.

Used in​

Members of other types that take, return or hold a FriendsRequestsPanel: