public void ReleaseContentList() { if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ContentController, (UnityEngine.Object)null)) { this.m_ContentController.Release(); } this.m_ContentSource = (MultiInvitationSendWindow.Content.ItemSource)null; this.m_SendList.Clear(); }
public void InitializeContentList() { this.ReleaseContentList(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ContentController, (UnityEngine.Object)null)) { return; } this.m_ContentSource = new MultiInvitationSendWindow.Content.ItemSource(); List <FriendData> list = new List <FriendData>((IEnumerable <FriendData>)MonoSingleton <GameManager> .Instance.Player.Friends); MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance; if (UnityEngine.Object.op_Inequality((UnityEngine.Object)instance, (UnityEngine.Object)null)) { List <MyPhoton.MyPlayer> roomPlayerList = instance.GetRoomPlayerList(); for (int index1 = 0; index1 < roomPlayerList.Count; ++index1) { if (roomPlayerList[index1] != null && !string.IsNullOrEmpty(roomPlayerList[index1].json)) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type MultiInvitationSendWindow.\u003CInitializeContentList\u003Ec__AnonStorey34A listCAnonStorey34A = new MultiInvitationSendWindow.\u003CInitializeContentList\u003Ec__AnonStorey34A(); // ISSUE: reference to a compiler-generated field listCAnonStorey34A.param = JSON_MyPhotonPlayerParam.Parse(roomPlayerList[index1].json); // ISSUE: reference to a compiler-generated field if (listCAnonStorey34A.param != null) { // ISSUE: reference to a compiler-generated method int index2 = list.FindIndex(new Predicate <FriendData>(listCAnonStorey34A.\u003C\u003Em__3AA)); if (index2 != -1) { list.RemoveAt(index2); } } } } } for (int index = 0; index < list.Count; ++index) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type MultiInvitationSendWindow.\u003CInitializeContentList\u003Ec__AnonStorey34B listCAnonStorey34B = new MultiInvitationSendWindow.\u003CInitializeContentList\u003Ec__AnonStorey34B(); // ISSUE: reference to a compiler-generated field listCAnonStorey34B.data = list[index]; bool flag = false; // ISSUE: reference to a compiler-generated field if (listCAnonStorey34B.data != null) { // ISSUE: reference to a compiler-generated method if (MultiInvitationSendWindow.m_Invited.FindIndex(new Predicate <string>(listCAnonStorey34B.\u003C\u003Em__3AB)) != -1) { flag = true; } else { // ISSUE: reference to a compiler-generated field if (!listCAnonStorey34B.data.MultiPush) { flag = true; } else { // ISSUE: reference to a compiler-generated field if (TimeManager.GetUnixSec(DateTime.Now) - listCAnonStorey34B.data.LastLogin > 86400L) { flag = true; } } } } else { flag = true; } if (flag) { list.RemoveAt(index); --index; } } SortUtility.StableSort <FriendData>(list, (Comparison <FriendData>)((p1, p2) => (!p1.IsFavorite ? p1.LastLogin : long.MaxValue).CompareTo(!p2.IsFavorite ? p2.LastLogin : long.MaxValue))); list.Reverse(); for (int index = 0; index < list.Count; ++index) { FriendData friend = list[index]; if (friend != null) { MultiInvitationSendWindow.Content.ItemSource.ItemParam itemParam = new MultiInvitationSendWindow.Content.ItemSource.ItemParam(friend); if (itemParam.IsValid()) { this.m_ContentSource.Add(itemParam); } } } this.m_ContentController.Initialize((ContentSource)this.m_ContentSource, Vector2.get_zero()); }
public void InitializeContentList() { this.ReleaseContentList(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ContentController, (UnityEngine.Object)null)) { return; } this.m_ContentSource = new MultiInvitationSendWindow.Content.ItemSource(); List <FriendData> list = new List <FriendData>((IEnumerable <FriendData>)MonoSingleton <GameManager> .Instance.Player.Friends); MyPhoton instance = PunMonoSingleton <MyPhoton> .Instance; if (UnityEngine.Object.op_Inequality((UnityEngine.Object)instance, (UnityEngine.Object)null)) { List <MyPhoton.MyPlayer> roomPlayerList = instance.GetRoomPlayerList(); for (int index1 = 0; index1 < roomPlayerList.Count; ++index1) { if (roomPlayerList[index1] != null && !string.IsNullOrEmpty(roomPlayerList[index1].json)) { JSON_MyPhotonPlayerParam param = JSON_MyPhotonPlayerParam.Parse(roomPlayerList[index1].json); if (param != null) { int index2 = list.FindIndex((Predicate <FriendData>)(prop => prop.UID == param.UID)); if (index2 != -1) { list.RemoveAt(index2); } } } } } for (int index = 0; index < list.Count; ++index) { FriendData data = list[index]; bool flag = false; if (data != null) { if (MultiInvitationSendWindow.m_Invited.FindIndex((Predicate <string>)(prop => prop == data.UID)) != -1) { flag = true; } else if (!data.MultiPush) { flag = true; } else if (TimeManager.GetUnixSec(DateTime.Now) - data.LastLogin > 86400L) { flag = true; } } else { flag = true; } if (flag) { list.RemoveAt(index); --index; } } SortUtility.StableSort <FriendData>(list, (Comparison <FriendData>)((p1, p2) => (!p1.IsFavorite ? p1.LastLogin : long.MaxValue).CompareTo(!p2.IsFavorite ? p2.LastLogin : long.MaxValue))); list.Reverse(); for (int index = 0; index < list.Count; ++index) { FriendData friend = list[index]; if (friend != null) { MultiInvitationSendWindow.Content.ItemSource.ItemParam itemParam = new MultiInvitationSendWindow.Content.ItemSource.ItemParam(friend); if (itemParam.IsValid()) { this.m_ContentSource.Add(itemParam); } } } this.m_ContentController.Initialize((ContentSource)this.m_ContentSource, Vector2.get_zero()); }