SnapDotNet.Apps.ViewModels.SignedIn.MainViewModel.GetFriends C# (CSharp) Method

GetFriends() private method

private GetFriends ( ) : void
return void
        private void GetFriends()
        {
            if (string.IsNullOrEmpty(CurrentFriendSearchQuery))
            {
                QuickAccessItems = new ObservableCollection<object>();

                // Groups first
                // TODO: Add group support

                // Then best friends
                foreach (var bestFriend in App.SnapChatManager.Account.BestFriends)
                {
                    if (QuickAccessItems.Count > MaximumFriendRows)
                        break;

                    foreach (var friend in App.SnapChatManager.Account.Friends)
                    {
                        if (friend.Name == bestFriend)
                        {
                            QuickAccessItems.Add(friend);
                            break;
                        }
                    }
                }

                // Then the bottom feeders (TODO: Sort by recent interactions)
                foreach (var friend in App.SnapChatManager.Account.Friends)
                {
                    if (QuickAccessItems.Count > MaximumFriendRows)
                        break;

                    if (!QuickAccessItems.Contains(friend))
                        QuickAccessItems.Add(friend);
                }
            }
            else
            {
                // search friends
            }
        }