getFriendListOfUser static method
Return the friendlist by topic for the user id and ensures no multiple FriendLists are used for the same topic
Implementation
static FriendList getFriendListOfUser(LocalityUser receivingUser) {
String topic = getTopicOfFriendListOfUser(receivingUser.id);
if (!friendListByTopic.containsKey(topic)) {
FriendList friendListOfReceivingUser = FriendList(receivingUser);
friendListByTopic[topic] = friendListOfReceivingUser;
LocalitySocialCloud.supervise(friendListOfReceivingUser);
return friendListOfReceivingUser;
} else {
return friendListByTopic[topic]!;
}
}