| | 1 | | using System; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using System.Linq; |
| | 4 | | using DCL; |
| | 5 | | using DCL.Helpers; |
| | 6 | | using SocialFeaturesAnalytics; |
| | 7 | | using TMPro; |
| | 8 | | using UnityEngine; |
| | 9 | | using UnityEngine.UI; |
| | 10 | |
|
| | 11 | | public class FriendsTabComponentView : BaseComponentView |
| | 12 | | { |
| | 13 | | private const int CREATION_AMOUNT_PER_FRAME = 5; |
| | 14 | | private const int AVATAR_SNAPSHOTS_PER_FRAME = 5; |
| | 15 | | private const int PRE_INSTANTIATED_ENTRIES = 25; |
| | 16 | | private const string FRIEND_ENTRIES_POOL_NAME_PREFIX = "FriendEntriesPool_"; |
| | 17 | |
|
| | 18 | | [SerializeField] private GameObject enabledHeader; |
| | 19 | | [SerializeField] private GameObject disabledHeader; |
| | 20 | | [SerializeField] private GameObject emptyStateContainer; |
| | 21 | | [SerializeField] private GameObject filledStateContainer; |
| | 22 | | [SerializeField] private FriendEntry entryPrefab; |
| | 23 | | [SerializeField] private FriendListComponents onlineFriendsList; |
| | 24 | | [SerializeField] private FriendListComponents offlineFriendsList; |
| | 25 | | [SerializeField] private FriendListComponents allFriendsList; |
| | 26 | | [SerializeField] private FriendListComponents searchResultsFriendList; |
| | 27 | | [SerializeField] private SearchBarComponentView searchBar; |
| | 28 | | [SerializeField] private UserContextMenu contextMenuPanel; |
| | 29 | | [SerializeField] private Model model; |
| | 30 | | [SerializeField] private RectTransform viewport; |
| | 31 | |
|
| | 32 | | [Header("Load More Entries")] [SerializeField] |
| | 33 | | internal Button loadMoreEntriesButton; |
| | 34 | |
|
| | 35 | | [SerializeField] internal GameObject loadMoreEntriesContainer; |
| | 36 | | [SerializeField] internal TMP_Text loadMoreEntriesLabel; |
| | 37 | |
|
| 24 | 38 | | private readonly Dictionary<string, FriendEntryModel> creationQueue = |
| | 39 | | new Dictionary<string, FriendEntryModel>(); |
| | 40 | |
|
| 24 | 41 | | private readonly Dictionary<string, PoolableObject> pooleableEntries = new Dictionary<string, PoolableObject>(); |
| 24 | 42 | | private readonly Dictionary<string, FriendEntry> entries = new Dictionary<string, FriendEntry>(); |
| | 43 | | private Pool entryPool; |
| | 44 | | private int currentAvatarSnapshotIndex; |
| | 45 | | private bool isLayoutDirty; |
| | 46 | | private Dictionary<string, FriendEntryModel> filteredEntries; |
| | 47 | | private IChatController chatController; |
| | 48 | | private ILastReadMessagesService lastReadMessagesService; |
| | 49 | | private IFriendsController friendsController; |
| | 50 | | private ISocialAnalytics socialAnalytics; |
| | 51 | |
|
| 0 | 52 | | public Dictionary<string, FriendEntry> Entries => entries; |
| 18 | 53 | | public int Count => entries.Count + creationQueue.Keys.Count(s => !entries.ContainsKey(s)); |
| | 54 | |
|
| 0 | 55 | | public bool DidDeferredCreationCompleted => creationQueue.Count == 0; |
| | 56 | |
|
| | 57 | | public event Action<string> OnSearchRequested; |
| | 58 | |
|
| | 59 | | public event Action<FriendEntryModel> OnWhisper; |
| | 60 | | public event Action<string> OnDeleteConfirmation; |
| | 61 | | public event Action OnRequireMoreFriends; |
| | 62 | |
|
| | 63 | | public void Initialize(IChatController chatController, |
| | 64 | | ILastReadMessagesService lastReadMessagesService, |
| | 65 | | IFriendsController friendsController, |
| | 66 | | ISocialAnalytics socialAnalytics) |
| | 67 | | { |
| 23 | 68 | | this.chatController = chatController; |
| 23 | 69 | | this.lastReadMessagesService = lastReadMessagesService; |
| 23 | 70 | | this.friendsController = friendsController; |
| 23 | 71 | | this.socialAnalytics = socialAnalytics; |
| 23 | 72 | | } |
| | 73 | |
|
| | 74 | | public override void OnEnable() |
| | 75 | | { |
| 24 | 76 | | base.OnEnable(); |
| | 77 | |
|
| 24 | 78 | | searchBar.Configure(new SearchBarComponentModel {placeHolderText = "Search friend"}); |
| 24 | 79 | | searchBar.OnSearchText += HandleSearchInputChanged; |
| 24 | 80 | | contextMenuPanel.OnBlock += HandleFriendBlockRequest; |
| 24 | 81 | | contextMenuPanel.OnUnfriend += HandleUnfriendRequest; |
| 24 | 82 | | loadMoreEntriesButton.onClick.AddListener(RequestMoreFriendEntries); |
| | 83 | |
|
| | 84 | | int SortByAlphabeticalOrder(FriendEntryBase u1, FriendEntryBase u2) |
| | 85 | | { |
| 0 | 86 | | return string.Compare(u1.Model.userName, u2.Model.userName, StringComparison.InvariantCultureIgnoreCase); |
| | 87 | | } |
| | 88 | |
|
| 24 | 89 | | onlineFriendsList.list.SortingMethod = SortByAlphabeticalOrder; |
| 24 | 90 | | offlineFriendsList.list.SortingMethod = SortByAlphabeticalOrder; |
| 24 | 91 | | searchResultsFriendList.list.SortingMethod = SortByAlphabeticalOrder; |
| 24 | 92 | | UpdateLayout(); |
| 24 | 93 | | UpdateEmptyOrFilledState(); |
| | 94 | |
|
| | 95 | | //TODO temporary, remove this and allFriendsList gameobjects later |
| 24 | 96 | | allFriendsList.list.gameObject.SetActive(false); |
| 24 | 97 | | allFriendsList.headerContainer.gameObject.SetActive(false); |
| 24 | 98 | | } |
| | 99 | |
|
| | 100 | | public override void OnDisable() |
| | 101 | | { |
| 24 | 102 | | base.OnDisable(); |
| | 103 | |
|
| 24 | 104 | | searchBar.OnSearchText -= HandleSearchInputChanged; |
| 24 | 105 | | contextMenuPanel.OnBlock -= HandleFriendBlockRequest; |
| 24 | 106 | | contextMenuPanel.OnUnfriend -= HandleUnfriendRequest; |
| 24 | 107 | | loadMoreEntriesButton.onClick.RemoveListener(RequestMoreFriendEntries); |
| 24 | 108 | | } |
| | 109 | |
|
| | 110 | | public void Show() |
| | 111 | | { |
| 8 | 112 | | gameObject.SetActive(true); |
| 8 | 113 | | enabledHeader.SetActive(true); |
| 8 | 114 | | disabledHeader.SetActive(false); |
| 8 | 115 | | searchBar.ClearSearch(); |
| 8 | 116 | | } |
| | 117 | |
|
| | 118 | | public void Hide() |
| | 119 | | { |
| 7 | 120 | | gameObject.SetActive(false); |
| 7 | 121 | | enabledHeader.SetActive(false); |
| 7 | 122 | | disabledHeader.SetActive(true); |
| 7 | 123 | | contextMenuPanel.Hide(); |
| 7 | 124 | | } |
| | 125 | |
|
| | 126 | | public override void Update() |
| | 127 | | { |
| 34 | 128 | | base.Update(); |
| | 129 | |
|
| 34 | 130 | | if (isLayoutDirty) |
| 16 | 131 | | Utils.ForceRebuildLayoutImmediate((RectTransform) filledStateContainer.transform); |
| 34 | 132 | | isLayoutDirty = false; |
| | 133 | |
|
| 34 | 134 | | SortDirtyLists(); |
| 34 | 135 | | FetchProfilePicturesForVisibleEntries(); |
| 34 | 136 | | SetQueuedEntries(); |
| 34 | 137 | | } |
| | 138 | |
|
| | 139 | | public void Clear() |
| | 140 | | { |
| 0 | 141 | | entries.ToList().ForEach(pair => Remove(pair.Key)); |
| | 142 | |
|
| 0 | 143 | | onlineFriendsList.list.Clear(); |
| 0 | 144 | | offlineFriendsList.list.Clear(); |
| | 145 | |
|
| 0 | 146 | | searchResultsFriendList.list.Clear(); |
| 0 | 147 | | UpdateEmptyOrFilledState(); |
| 0 | 148 | | UpdateCounterLabel(); |
| 0 | 149 | | } |
| | 150 | |
|
| | 151 | | public void Remove(string userId) |
| | 152 | | { |
| 10 | 153 | | if (creationQueue.ContainsKey(userId)) |
| 1 | 154 | | creationQueue.Remove(userId); |
| | 155 | |
|
| 18 | 156 | | if (!entries.ContainsKey(userId)) return; |
| | 157 | |
|
| 2 | 158 | | if (pooleableEntries.TryGetValue(userId, out var pooleableObject)) |
| | 159 | | { |
| 2 | 160 | | entryPool.Release(pooleableObject); |
| 2 | 161 | | pooleableEntries.Remove(userId); |
| | 162 | | } |
| | 163 | |
|
| 2 | 164 | | entries.Remove(userId); |
| | 165 | |
|
| 2 | 166 | | offlineFriendsList.list.Remove(userId); |
| 2 | 167 | | onlineFriendsList.list.Remove(userId); |
| | 168 | |
|
| 2 | 169 | | searchResultsFriendList.list.Remove(userId); |
| | 170 | |
|
| 2 | 171 | | UpdateEmptyOrFilledState(); |
| 2 | 172 | | UpdateCounterLabel(); |
| 2 | 173 | | UpdateLayout(); |
| 2 | 174 | | } |
| | 175 | |
|
| 42 | 176 | | public FriendEntry Get(string userId) => entries.ContainsKey(userId) ? entries[userId] : null; |
| | 177 | |
|
| | 178 | | public void Populate(string userId, FriendEntryModel model) |
| | 179 | | { |
| 5 | 180 | | if (!entries.ContainsKey(userId)) |
| | 181 | | { |
| 0 | 182 | | if (creationQueue.ContainsKey(userId)) |
| 0 | 183 | | creationQueue[userId] = model; |
| 0 | 184 | | return; |
| | 185 | | } |
| | 186 | |
|
| 5 | 187 | | var entry = entries[userId]; |
| 5 | 188 | | entry.Populate(model); |
| | 189 | |
|
| 5 | 190 | | if (filteredEntries?.ContainsKey(userId) ?? false) |
| | 191 | | { |
| 0 | 192 | | offlineFriendsList.list.Remove(userId); |
| 0 | 193 | | onlineFriendsList.list.Remove(userId); |
| 0 | 194 | | searchResultsFriendList.list.Add(userId, entry); |
| 0 | 195 | | searchResultsFriendList.FlagAsPendingToSort(); |
| 0 | 196 | | } |
| | 197 | | else |
| | 198 | | { |
| 5 | 199 | | if (model.status == PresenceStatus.ONLINE) |
| | 200 | | { |
| 0 | 201 | | offlineFriendsList.list.Remove(userId); |
| 0 | 202 | | onlineFriendsList.list.Add(userId, entry); |
| 0 | 203 | | onlineFriendsList.FlagAsPendingToSort(); |
| 0 | 204 | | } |
| | 205 | | else |
| | 206 | | { |
| 5 | 207 | | onlineFriendsList.list.Remove(userId); |
| 5 | 208 | | offlineFriendsList.list.Add(userId, entry); |
| 5 | 209 | | offlineFriendsList.FlagAsPendingToSort(); |
| | 210 | | } |
| | 211 | | } |
| | 212 | |
|
| 5 | 213 | | UpdateLayout(); |
| 5 | 214 | | UpdateEmptyOrFilledState(); |
| 5 | 215 | | UpdateCounterLabel(); |
| 5 | 216 | | } |
| | 217 | |
|
| | 218 | | public void Set(string userId, FriendEntryModel model) |
| | 219 | | { |
| 5 | 220 | | if (creationQueue.ContainsKey(userId)) |
| | 221 | | { |
| 0 | 222 | | creationQueue[userId] = model; |
| 0 | 223 | | return; |
| | 224 | | } |
| | 225 | |
|
| 5 | 226 | | if (!entries.ContainsKey(userId)) |
| | 227 | | { |
| 5 | 228 | | CreateEntry(userId); |
| 5 | 229 | | UpdateLayout(); |
| | 230 | | } |
| | 231 | |
|
| 5 | 232 | | Populate(userId, model); |
| 5 | 233 | | } |
| | 234 | |
|
| | 235 | | public override void RefreshControl() |
| | 236 | | { |
| 1 | 237 | | onlineFriendsList.Show(); |
| 1 | 238 | | offlineFriendsList.Show(); |
| | 239 | |
|
| 1 | 240 | | if (model.isOnlineFriendsExpanded) |
| 1 | 241 | | onlineFriendsList.list.Expand(); |
| | 242 | | else |
| 0 | 243 | | onlineFriendsList.list.Collapse(); |
| | 244 | |
|
| 1 | 245 | | if (model.isOfflineFriendsExpanded) |
| 1 | 246 | | offlineFriendsList.list.Expand(); |
| | 247 | | else |
| 0 | 248 | | offlineFriendsList.list.Collapse(); |
| 0 | 249 | | } |
| | 250 | |
|
| | 251 | | public void ClearFilter() |
| | 252 | | { |
| 0 | 253 | | filteredEntries = null; |
| | 254 | |
|
| 0 | 255 | | if (searchResultsFriendList.list.gameObject.activeSelf) |
| | 256 | | { |
| 0 | 257 | | foreach (var pair in entries) |
| | 258 | | { |
| 0 | 259 | | searchResultsFriendList.list.Remove(pair.Key); |
| 0 | 260 | | Populate(pair.Key, pair.Value.Model); |
| | 261 | | } |
| | 262 | | } |
| | 263 | |
|
| 0 | 264 | | searchResultsFriendList.Hide(); |
| | 265 | |
|
| 0 | 266 | | offlineFriendsList.Show(); |
| 0 | 267 | | onlineFriendsList.Show(); |
| 0 | 268 | | offlineFriendsList.Sort(); |
| 0 | 269 | | onlineFriendsList.Sort(); |
| 0 | 270 | | offlineFriendsList.list.Filter(entry => true); |
| 0 | 271 | | onlineFriendsList.list.Filter(entry => true); |
| 0 | 272 | | } |
| | 273 | |
|
| | 274 | | public void Filter(Dictionary<string, FriendEntryModel> search) |
| | 275 | | { |
| 0 | 276 | | filteredEntries = search; |
| | 277 | |
|
| 0 | 278 | | offlineFriendsList.Hide(); |
| 0 | 279 | | onlineFriendsList.Hide(); |
| | 280 | |
|
| 0 | 281 | | if (!searchResultsFriendList.list.gameObject.activeSelf) |
| | 282 | | { |
| 0 | 283 | | foreach (var pair in entries) |
| | 284 | | { |
| 0 | 285 | | searchResultsFriendList.list.Add(pair.Key, pair.Value); |
| | 286 | |
|
| 0 | 287 | | offlineFriendsList.list.Remove(pair.Key); |
| 0 | 288 | | onlineFriendsList.list.Remove(pair.Key); |
| | 289 | | } |
| | 290 | | } |
| | 291 | |
|
| 0 | 292 | | searchResultsFriendList.Show(); |
| 0 | 293 | | searchResultsFriendList.Sort(); |
| 0 | 294 | | searchResultsFriendList.list.Filter(entry => search.ContainsKey(entry.Model.userId)); |
| | 295 | |
|
| 0 | 296 | | UpdateCounterLabel(); |
| 0 | 297 | | HideMoreFriendsToLoadHint(); |
| 0 | 298 | | UpdateLayout(); |
| 0 | 299 | | } |
| | 300 | |
|
| 6 | 301 | | public void Enqueue(string userId, FriendEntryModel model) => creationQueue[userId] = model; |
| | 302 | |
|
| | 303 | | public void ShowMoreFriendsToLoadHint(int pendingFriendsCount) |
| | 304 | | { |
| 1 | 305 | | loadMoreEntriesLabel.SetText( |
| | 306 | | $"{pendingFriendsCount} friends hidden. Use the search bar to find them or click below to show more."); |
| 1 | 307 | | ShowMoreFriendsToLoadHint(); |
| 1 | 308 | | } |
| | 309 | |
|
| | 310 | | public void HideMoreFriendsToLoadHint() |
| | 311 | | { |
| 1 | 312 | | loadMoreEntriesContainer.SetActive(false); |
| 1 | 313 | | UpdateLayout(); |
| 1 | 314 | | } |
| | 315 | |
|
| | 316 | | private void ShowMoreFriendsToLoadHint() |
| | 317 | | { |
| 1 | 318 | | loadMoreEntriesContainer.SetActive(true); |
| 1 | 319 | | UpdateLayout(); |
| 1 | 320 | | } |
| | 321 | |
|
| 8 | 322 | | private void HandleSearchInputChanged(string search) => OnSearchRequested?.Invoke(search); |
| | 323 | |
|
| | 324 | | private void SetQueuedEntries() |
| | 325 | | { |
| 63 | 326 | | if (creationQueue.Count == 0) return; |
| | 327 | |
|
| 20 | 328 | | for (var i = 0; i < CREATION_AMOUNT_PER_FRAME && creationQueue.Count != 0; i++) |
| | 329 | | { |
| 5 | 330 | | var pair = creationQueue.FirstOrDefault(); |
| 5 | 331 | | creationQueue.Remove(pair.Key); |
| 5 | 332 | | Set(pair.Key, pair.Value); |
| | 333 | | } |
| 5 | 334 | | } |
| | 335 | |
|
| | 336 | | private void FetchProfilePicturesForVisibleEntries() |
| | 337 | | { |
| 68 | 338 | | foreach (var entry in entries.Values.Skip(currentAvatarSnapshotIndex).Take(AVATAR_SNAPSHOTS_PER_FRAME)) |
| | 339 | | { |
| 0 | 340 | | if (entry.IsVisible(viewport)) |
| 0 | 341 | | entry.EnableAvatarSnapshotFetching(); |
| | 342 | | else |
| 0 | 343 | | entry.DisableAvatarSnapshotFetching(); |
| | 344 | | } |
| | 345 | |
|
| 34 | 346 | | currentAvatarSnapshotIndex += AVATAR_SNAPSHOTS_PER_FRAME; |
| | 347 | |
|
| 34 | 348 | | if (currentAvatarSnapshotIndex >= entries.Count) |
| 34 | 349 | | currentAvatarSnapshotIndex = 0; |
| 34 | 350 | | } |
| | 351 | |
|
| | 352 | | private void UpdateEmptyOrFilledState() |
| | 353 | | { |
| 31 | 354 | | emptyStateContainer.SetActive(entries.Count == 0); |
| 31 | 355 | | filledStateContainer.SetActive(entries.Count > 0); |
| 31 | 356 | | } |
| | 357 | |
|
| | 358 | | private void CreateEntry(string userId) |
| | 359 | | { |
| 5 | 360 | | entryPool = GetEntryPool(); |
| 5 | 361 | | var newFriendEntry = entryPool.Get(); |
| 5 | 362 | | pooleableEntries.Add(userId, newFriendEntry); |
| 5 | 363 | | var entry = newFriendEntry.gameObject.GetComponent<FriendEntry>(); |
| 5 | 364 | | entry.Initialize(chatController, lastReadMessagesService, friendsController, socialAnalytics); |
| 5 | 365 | | entries.Add(userId, entry); |
| | 366 | |
|
| 5 | 367 | | entry.OnMenuToggle -= OnEntryMenuToggle; |
| 5 | 368 | | entry.OnMenuToggle += OnEntryMenuToggle; |
| 5 | 369 | | entry.OnWhisperClick -= OnEntryWhisperClick; |
| 5 | 370 | | entry.OnWhisperClick += OnEntryWhisperClick; |
| 5 | 371 | | } |
| | 372 | |
|
| 0 | 373 | | private void OnEntryWhisperClick(FriendEntry friendEntry) => OnWhisper?.Invoke(friendEntry.Model); |
| | 374 | |
|
| | 375 | | private void OnEntryMenuToggle(FriendEntryBase friendEntry) |
| | 376 | | { |
| 0 | 377 | | contextMenuPanel.Show(friendEntry.Model.userId); |
| 0 | 378 | | friendEntry.Dock(contextMenuPanel); |
| 0 | 379 | | } |
| | 380 | |
|
| | 381 | | private Pool GetEntryPool() |
| | 382 | | { |
| 5 | 383 | | var entryPool = PoolManager.i.GetPool(FRIEND_ENTRIES_POOL_NAME_PREFIX + name + GetInstanceID()); |
| 5 | 384 | | if (entryPool != null) return entryPool; |
| | 385 | |
|
| 5 | 386 | | entryPool = PoolManager.i.AddPool( |
| | 387 | | FRIEND_ENTRIES_POOL_NAME_PREFIX + name + GetInstanceID(), |
| | 388 | | Instantiate(entryPrefab).gameObject, |
| | 389 | | maxPrewarmCount: PRE_INSTANTIATED_ENTRIES, |
| | 390 | | isPersistent: true); |
| 5 | 391 | | entryPool.ForcePrewarm(); |
| | 392 | |
|
| 5 | 393 | | return entryPool; |
| | 394 | | } |
| | 395 | |
|
| | 396 | | private void UpdateCounterLabel() |
| | 397 | | { |
| 7 | 398 | | onlineFriendsList.countText.SetText("ONLINE ({0})", onlineFriendsList.list.Count()); |
| 7 | 399 | | offlineFriendsList.countText.SetText("OFFLINE ({0})", offlineFriendsList.list.Count()); |
| | 400 | |
|
| 7 | 401 | | searchResultsFriendList.countText.SetText("Results ({0})", searchResultsFriendList.list.Count()); |
| 7 | 402 | | } |
| | 403 | |
|
| | 404 | | private void HandleFriendBlockRequest(string userId, bool blockUser) |
| | 405 | | { |
| 0 | 406 | | var friendEntryToBlock = Get(userId); |
| 0 | 407 | | if (friendEntryToBlock == null) return; |
| | 408 | | // instantly refresh ui |
| 0 | 409 | | friendEntryToBlock.Model.blocked = blockUser; |
| 0 | 410 | | Set(userId, friendEntryToBlock.Model); |
| 0 | 411 | | } |
| | 412 | |
|
| | 413 | | private void HandleUnfriendRequest(string userId) |
| | 414 | | { |
| 0 | 415 | | var entry = Get(userId); |
| 0 | 416 | | if (entry == null) return; |
| 0 | 417 | | Remove(userId); |
| 0 | 418 | | OnDeleteConfirmation?.Invoke(userId); |
| 0 | 419 | | } |
| | 420 | |
|
| 0 | 421 | | private void UpdateLayout() => isLayoutDirty = true; |
| | 422 | |
|
| | 423 | | private void SortDirtyLists() |
| | 424 | | { |
| 34 | 425 | | if (offlineFriendsList.IsSortingDirty) |
| 2 | 426 | | offlineFriendsList.Sort(); |
| 34 | 427 | | if (onlineFriendsList.IsSortingDirty) |
| 0 | 428 | | onlineFriendsList.Sort(); |
| | 429 | |
|
| 34 | 430 | | if (searchResultsFriendList.IsSortingDirty) |
| 0 | 431 | | searchResultsFriendList.Sort(); |
| 34 | 432 | | } |
| | 433 | |
|
| 1 | 434 | | private void RequestMoreFriendEntries() => OnRequireMoreFriends?.Invoke(); |
| | 435 | |
|
| | 436 | | [Serializable] |
| | 437 | | private struct FriendListComponents |
| | 438 | | { |
| | 439 | | public CollapsableSortedFriendEntryList list; |
| | 440 | | public TMP_Text countText; |
| | 441 | | public GameObject headerContainer; |
| | 442 | |
|
| 0 | 443 | | public bool IsSortingDirty { get; private set; } |
| | 444 | |
|
| | 445 | | public void Show() |
| | 446 | | { |
| 2 | 447 | | list.Show(); |
| 2 | 448 | | headerContainer.SetActive(true); |
| 2 | 449 | | } |
| | 450 | |
|
| | 451 | | public void Hide() |
| | 452 | | { |
| 0 | 453 | | list.Hide(); |
| 0 | 454 | | headerContainer.SetActive(false); |
| 0 | 455 | | } |
| | 456 | |
|
| 0 | 457 | | public void FlagAsPendingToSort() => IsSortingDirty = true; |
| | 458 | |
|
| | 459 | | public void Sort() |
| | 460 | | { |
| 2 | 461 | | list.Sort(); |
| 2 | 462 | | IsSortingDirty = false; |
| 2 | 463 | | } |
| | 464 | | } |
| | 465 | |
|
| | 466 | | [Serializable] |
| | 467 | | private class Model |
| | 468 | | { |
| | 469 | | public bool isOnlineFriendsExpanded; |
| | 470 | | public bool isOfflineFriendsExpanded; |
| | 471 | | } |
| | 472 | | } |