SocialManager.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. using UnityEngine.EventSystems;
  4. using System;
  5. using System.Collections;
  6. using System.Diagnostics;
  7. using System.Collections.Generic;
  8. using LitJson;
  9. using Debug = UnityEngine.Debug;
  10. public class SocialManager : Regist
  11. {
  12. #region Config
  13. public static bool OpenRankPanelFlag;
  14. public static int RecordCommentLastIndex;
  15. public static int RecordCommentFirstIndex;
  16. public static bool OpenCommentFlag;
  17. public static Vector3 RecordCommentPosition;
  18. public static bool IsPlayer;
  19. public static bool IsPanelOpen;
  20. public static bool PullCommentDataFlag;
  21. public static bool UpdateCommentDataFlag;
  22. public static int PlayerLastDisplayIndex = -1;
  23. public static int PlayerFirstDisplayIndex;
  24. public static int VisiteeLastDisplayIndex = -1;
  25. public static int VisiteeFirstDisplayIndex;
  26. public static int CurrentPlayerCommentPage;
  27. public static int CurrentVisiteeCommentPage;
  28. public static bool IsFriendFilterOn;
  29. public static Text PraiseText;
  30. public static Button PraiseButton;
  31. public static Toggle CommentFriendFilterToggle;
  32. public static DateTime CommentTime;
  33. public static InputField CommentInputField;
  34. public static ScrollRectPlus CommentScrollRect;
  35. public static float UpdateRankDataTime = 5;
  36. public static float UpdateRankDataTimer = 0;
  37. public static float UpdatePraiseDataTime = 10;
  38. public static float UpdatePraiseDataTimer = 5;
  39. public static float CommentTimeSpan = 30f;
  40. public static List<CommentData> PlayerCommentDatas = new List<CommentData>();
  41. public static List<CommentData> VisiteeCommentDatas = new List<CommentData>();
  42. public static List<CommentItem> CommentItems = new List<CommentItem>();
  43. private static int CommentPanelMaxRevertAmt = 15;
  44. private static int CommentPanelMaxChildAmt = 20;
  45. private static float CommentItemHeight = 120;
  46. #endregion
  47. public void Update()
  48. {
  49. if (!HttpManager.IsRankDataReady)
  50. {
  51. UpdateRankDataTimer += Time.deltaTime;
  52. if (UpdateRankDataTimer >= UpdateRankDataTime)
  53. {
  54. UpdateRankDataTimer = 0;
  55. HttpManager.GetRankData();
  56. }
  57. }
  58. if (VisitManager.InVisit)
  59. {
  60. return;
  61. }
  62. UpdatePraiseDataTimer += Time.deltaTime;
  63. if (UpdatePraiseDataTimer >= UpdatePraiseDataTime)
  64. {
  65. UpdatePraiseDataTimer = 0;
  66. PraiseText.text = HttpManager.PraiseAmt.ToString();
  67. }
  68. }
  69. public override void FirstInit()
  70. {
  71. PraiseText = ResourceManager.Get<Text>(ObjectLabel.C_PraiseText);
  72. PraiseButton = ResourceManager.Get<Button>(ObjectLabel.C_Praise);
  73. CommentInputField = ResourceManager.Get<InputField>(ObjectLabel.Q_InputField);
  74. CommentScrollRect = ResourceManager.Get<ScrollRectPlus>(ObjectLabel.Q_ScrollRect);
  75. CommentFriendFilterToggle = ResourceManager.Get<Toggle>(ObjectLabel.Q_FriendFilterButton);
  76. CommentFriendFilterToggle.onValueChanged.AddListener(OnCommentFriendFilterToggleClick);
  77. CommentScrollRect.onValueChanged.AddListener(OnScroll);
  78. FriendPanel.OnFriendListRefresh += OnFriendListRefresh;
  79. VisitManager.OnEnterVisteeGarden += OnEnterVisiteeGarden;
  80. VisitManager.OnExitVisteeGarden += OnExitVisiteeGarden;
  81. }
  82. public static void Praise()
  83. {
  84. if (VisitManager.InVisit)
  85. {
  86. PraiseText.text = (int.Parse(PraiseText.text) + 1).ToString();
  87. HttpManager.Praise(HttpManager.SerialNumber, VisitManager.VisiteeSerialNumber);
  88. DisablePraise();
  89. }
  90. else
  91. {
  92. throw new Exception();
  93. }
  94. }
  95. public static void EnablePraise()
  96. {
  97. PraiseText.color = Lib.PraiseTextBlue;
  98. PraiseButton.image.color = Color.white;
  99. PraiseButton.interactable = true;
  100. }
  101. public static void DisablePraise()
  102. {
  103. PraiseText.color = Lib.PraiseTextWhite;
  104. PraiseButton.image.color = Lib.Pink;
  105. PraiseButton.interactable = false;
  106. }
  107. public static void Comment()
  108. {
  109. if (string.IsNullOrEmpty(CommentInputField.text))
  110. {
  111. Bubble.Show(Language.GetStr(LanguageLabel.UI__Lb_Send2));
  112. return;
  113. }
  114. if ((DateTime.Now - CommentTime).TotalSeconds > CommentTimeSpan)
  115. {
  116. CommentTime = DateTime.Now;
  117. string content = StringFilter.GetFilteredString(CommentInputField.text);
  118. HttpManager.AddComment(HttpManager.SerialNumber, VisitManager.VisiteeSerialNumber, content, CommentType.Garden);
  119. CommentInputField.text = "";
  120. }
  121. else
  122. {
  123. Bubble.Show(Language.GetStr(LanguageLabel.UI__Q_CommentTip));
  124. }
  125. }
  126. public static void OpenCommentPanel()
  127. {
  128. IsPlayer = !VisitManager.InVisit;
  129. if (IsPlayer)
  130. {
  131. UpdateCommentPage(IsPlayer);
  132. }
  133. else
  134. {
  135. if (string.IsNullOrEmpty(VisitManager.VisiteeSerialNumber))
  136. {
  137. Bubble.Show(null, Language.GetStr(LanguageLabel.UI__C_CannotComment));
  138. return;
  139. }
  140. else
  141. {
  142. UpdateCommentPage(IsPlayer);
  143. }
  144. }
  145. IsPanelOpen = true;
  146. ResourceManager.Get(ObjectLabel.Q_CommentBK).TweenForCG();
  147. ResourceManager.SetActive(ObjectLabel.Q_InputBK, VisitManager.InVisit);
  148. }
  149. public static void CloseCommentPanel()
  150. {
  151. ResourceManager.Get(ObjectLabel.Q_CommentBK).TweenBacCG();
  152. IsPanelOpen = false;
  153. }
  154. public static void RecordCommentPanel()
  155. {
  156. if (IsPlayer)
  157. {
  158. OpenCommentFlag = true;
  159. RecordCommentLastIndex = PlayerLastDisplayIndex;
  160. RecordCommentFirstIndex = PlayerFirstDisplayIndex;
  161. RecordCommentPosition = CommentScrollRect.content.transform.position;
  162. }
  163. }
  164. public static void RecoverCommentPanel()
  165. {
  166. if (OpenCommentFlag)
  167. {
  168. OpenCommentFlag = false;
  169. ClearCommentPanel();
  170. PlayerLastDisplayIndex = -1;
  171. PlayerFirstDisplayIndex = 0;
  172. int antiCrush = 0;
  173. while (PlayerFirstDisplayIndex != RecordCommentFirstIndex || PlayerLastDisplayIndex != RecordCommentLastIndex)
  174. {
  175. if (antiCrush > 10000)
  176. {
  177. throw new Exception("Crush");
  178. }
  179. if (CommentScrollRect.content.childCount >= CommentPanelMaxChildAmt)
  180. {
  181. CommentItem commentItem = CommentScrollRect.content.GetChild(0).GetComponent<CommentItem>();
  182. ResourceManager.Save(commentItem);
  183. CommentItems.Remove(commentItem);
  184. PlayerFirstDisplayIndex++;
  185. }
  186. PlayerLastDisplayIndex++;
  187. CommentData commentData = PlayerCommentDatas[PlayerLastDisplayIndex];
  188. CommentItem newCommentItem = ResourceManager.GetCommentItem(commentData.NickName, commentData.SerialNumber, commentData.Content);
  189. CommentItems.Add(newCommentItem);
  190. }
  191. CommentScrollRect.content.transform.position = RecordCommentPosition;
  192. OpenCommentPanel();
  193. }
  194. }
  195. public static void PullCommentPage(bool isPlayer)
  196. {
  197. PullCommentDataFlag = true;
  198. UpdateCommentDataFlag = false;
  199. //Debug.Log("PullPage");
  200. if (isPlayer)
  201. {
  202. HttpManager.GetComment
  203. (
  204. HttpManager.SerialNumber,
  205. (CurrentPlayerCommentPage + 1).ToString(),
  206. CommentType.Garden,
  207. data =>
  208. {
  209. if (!UpdateCommentDataFlag)
  210. {
  211. ReceiveCommentDatas(IsPlayer, data);
  212. NextCommentPage(IsPlayer, true);
  213. }
  214. else
  215. {
  216. PullCommentDataFlag = false;
  217. }
  218. }
  219. );
  220. }
  221. else
  222. {
  223. HttpManager.GetComment
  224. (
  225. HttpManager.SerialNumber,
  226. (CurrentVisiteeCommentPage + 1).ToString(),
  227. CommentType.Garden,
  228. data =>
  229. {
  230. if (!UpdateCommentDataFlag)
  231. {
  232. ReceiveCommentDatas(IsPlayer, data);
  233. NextCommentPage(IsPlayer, true);
  234. }
  235. else
  236. {
  237. PullCommentDataFlag = false;
  238. }
  239. }
  240. );
  241. }
  242. }
  243. public static void UpdateCommentPage(bool isPlayer)
  244. {
  245. UpdateCommentDataFlag = true;
  246. ClearCommentPanel();
  247. ResourceManager.Get(ObjectLabel.Q_Tip).TweenForCG();
  248. LanguageManager.Add(ResourceManager.Get<Text>(ObjectLabel.Q_Tip), Language.GetStr(LanguageLabel.UI__Loading));
  249. if (isPlayer)
  250. {
  251. //Debug.Log("UpdatePlayer");
  252. PlayerFirstDisplayIndex = 0;
  253. PlayerLastDisplayIndex = -1;
  254. CurrentPlayerCommentPage = 0;
  255. PlayerCommentDatas = new List<CommentData>();
  256. HttpManager.GetComment
  257. (
  258. HttpManager.SerialNumber,
  259. "1",
  260. CommentType.Garden,
  261. data =>
  262. {
  263. if (!VisitManager.InVisit)
  264. {
  265. DelayCall.Call(0.5f, () => ResourceManager.Get(ObjectLabel.Q_Tip).TweenBacCG());
  266. LanguageManager.Add(ResourceManager.Get<Text>(ObjectLabel.Q_Tip), Language.GetStr(LanguageLabel.UI__LoadSucceed));
  267. ReceiveCommentDatas(true, data);
  268. NextCommentPage(true, true);
  269. ResourceManager.Get<CanvasGroup>(ObjectLabel.Q_CommentBK).interactable = false;
  270. DelayCall.Call(1, () => ResourceManager.Get<CanvasGroup>(ObjectLabel.Q_CommentBK).interactable = true);
  271. }
  272. }
  273. );
  274. }
  275. else
  276. {
  277. //Debug.Log("UpdateVisitee");
  278. VisiteeFirstDisplayIndex = 0;
  279. VisiteeLastDisplayIndex = -1;
  280. CurrentVisiteeCommentPage = 0;
  281. VisiteeCommentDatas = new List<CommentData>();
  282. HttpManager.GetComment
  283. (
  284. VisitManager.VisiteeSerialNumber,
  285. "1",
  286. CommentType.Garden,
  287. data =>
  288. {
  289. if (VisitManager.InVisit)
  290. {
  291. DelayCall.Call(0.5f, () => ResourceManager.Get(ObjectLabel.Q_Tip).TweenBacCG());
  292. LanguageManager.Add(ResourceManager.Get<Text>(ObjectLabel.Q_Tip), Language.GetStr(LanguageLabel.UI__LoadSucceed));
  293. ReceiveCommentDatas(false, data);
  294. NextCommentPage(false, true);
  295. ResourceManager.Get<CanvasGroup>(ObjectLabel.Q_CommentBK).interactable = false;
  296. DelayCall.Call(1, () => ResourceManager.Get<CanvasGroup>(ObjectLabel.Q_CommentBK).interactable = true);
  297. }
  298. }
  299. );
  300. }
  301. }
  302. public static void ReceiveCommentDatas(bool isPlayer, JsonData jsonData)
  303. {
  304. Auxiliary.Instance.DelayCall
  305. (
  306. () =>
  307. {
  308. PullCommentDataFlag = false;
  309. },
  310. 1
  311. );
  312. if (!jsonData.Inst_Object.ContainsKey("l"))
  313. {
  314. return;
  315. }
  316. if (jsonData["l"].Count == 0)
  317. {
  318. return;
  319. }
  320. if (isPlayer)
  321. {
  322. CurrentPlayerCommentPage++;
  323. foreach (JsonData commentData in jsonData["l"])
  324. {
  325. PlayerCommentDatas.UniqueAdd(new CommentData(commentData));
  326. }
  327. }
  328. else
  329. {
  330. CurrentVisiteeCommentPage++;
  331. foreach (JsonData commentData in jsonData["l"])
  332. {
  333. VisiteeCommentDatas.UniqueAdd(new CommentData(commentData));
  334. }
  335. }
  336. }
  337. public static void NextCommentPage(bool isPlayer, bool isDownload)
  338. {
  339. //Debug.Log("NextPage");
  340. if (isPlayer)
  341. {
  342. int saveAmt = 0;
  343. int updateAmt = Mathf.Min(15, PlayerCommentDatas.Count - PlayerLastDisplayIndex - 1);
  344. for (int i = 0; i < updateAmt; i++)
  345. {
  346. if (CommentScrollRect.content.childCount >= CommentPanelMaxChildAmt)
  347. {
  348. saveAmt++;
  349. CommentItem commentItem = CommentScrollRect.content.GetChild(0).GetComponent<CommentItem>();
  350. ResourceManager.Save(commentItem);
  351. CommentItems.Remove(commentItem);
  352. PlayerFirstDisplayIndex++;
  353. }
  354. PlayerLastDisplayIndex++;
  355. CommentData commentData = PlayerCommentDatas[PlayerLastDisplayIndex];
  356. CommentItem newCommentItem = ResourceManager.GetCommentItem(commentData.NickName, commentData.SerialNumber, commentData.Content);
  357. CommentItems.Add(newCommentItem);
  358. }
  359. int offset = isDownload ? 1 : 0;
  360. float scaleFactor = isDownload ? CommentScrollRect.GetComponent<Image>().canvas.scaleFactor : 1;
  361. if (saveAmt > 0)
  362. {
  363. CommentScrollRect.content.position += new Vector3(0, -(saveAmt - offset)*CommentItemHeight*scaleFactor, 0);
  364. CommentScrollRect.AddContentOffset(new Vector3(0, -(saveAmt - offset)* CommentItemHeight * scaleFactor, 0));
  365. }
  366. }
  367. else
  368. {
  369. int saveAmt = 0;
  370. int updateAmt = Mathf.Min(15, VisiteeCommentDatas.Count - VisiteeLastDisplayIndex - 1);
  371. for (int i = 0; i < updateAmt; i++)
  372. {
  373. if (CommentScrollRect.content.childCount >= CommentPanelMaxChildAmt)
  374. {
  375. saveAmt++;
  376. CommentItem commentItem = CommentScrollRect.content.GetChild(0).GetComponent<CommentItem>();
  377. ResourceManager.Save(commentItem);
  378. CommentItems.Remove(commentItem);
  379. VisiteeFirstDisplayIndex++;
  380. }
  381. VisiteeLastDisplayIndex++;
  382. CommentData commentData = VisiteeCommentDatas[VisiteeLastDisplayIndex];
  383. CommentItem newCommentItem = ResourceManager.GetCommentItem(commentData.NickName, commentData.SerialNumber, commentData.Content);
  384. CommentItems.Add(newCommentItem);
  385. }
  386. int offset = isDownload ? 1 : 0;
  387. float scaleFactor = isDownload ? CommentScrollRect.GetComponent<Image>().canvas.scaleFactor : 1;
  388. if (saveAmt > 0)
  389. {
  390. CommentScrollRect.content.position += new Vector3(0, -(saveAmt - offset)* CommentItemHeight * scaleFactor, 0);
  391. CommentScrollRect.AddContentOffset(new Vector3(0, -(saveAmt - offset)* CommentItemHeight * scaleFactor, 0));
  392. }
  393. }
  394. }
  395. public static void PreviousCommentPage(bool isPlayer)
  396. {
  397. if (CommentScrollRect.content.childCount == 0)
  398. {
  399. return;
  400. }
  401. //Debug.Log("PreviousPage");
  402. if (isPlayer)
  403. {
  404. if (PlayerCommentDatas.Count > CommentPanelMaxChildAmt && PlayerFirstDisplayIndex > 0)
  405. {
  406. int revertAmt = Mathf.Min(CommentPanelMaxRevertAmt, PlayerFirstDisplayIndex);
  407. for (int i = 0; i < revertAmt; i++)
  408. {
  409. CommentItem commentItem = CommentScrollRect.content.GetChild(CommentScrollRect.content.childCount - 1).GetComponent<CommentItem>();
  410. ResourceManager.Save(commentItem);
  411. CommentItems.Remove(commentItem);
  412. CommentData commentData = VisiteeCommentDatas[VisiteeLastDisplayIndex];
  413. commentItem = ResourceManager.GetCommentItem(commentData.NickName, commentData.SerialNumber, commentData.Content);
  414. CommentItems.Add(commentItem);
  415. commentItem.transform.SetAsFirstSibling();
  416. PlayerLastDisplayIndex--;
  417. PlayerFirstDisplayIndex--;
  418. }
  419. if (revertAmt > 0)
  420. {
  421. CommentScrollRect.content.position += new Vector3(0, revertAmt* CommentItemHeight, 0);
  422. CommentScrollRect.AddContentOffset(new Vector3(0, revertAmt* CommentItemHeight, 0));
  423. }
  424. }
  425. }
  426. else
  427. {
  428. if (VisiteeCommentDatas.Count > CommentPanelMaxChildAmt && VisiteeFirstDisplayIndex > 0)
  429. {
  430. int revertAmt = Mathf.Min(CommentPanelMaxRevertAmt, VisiteeFirstDisplayIndex);
  431. for (int i = 0; i < revertAmt; i++)
  432. {
  433. CommentItem commentItem = CommentScrollRect.content.GetChild(CommentScrollRect.content.childCount - 1).GetComponent<CommentItem>();
  434. ResourceManager.Save(commentItem);
  435. CommentItems.Remove(commentItem);
  436. CommentData commentData = VisiteeCommentDatas[VisiteeLastDisplayIndex];
  437. commentItem = ResourceManager.GetCommentItem(commentData.NickName, commentData.SerialNumber, commentData.Content);
  438. CommentItems.Add(commentItem);
  439. commentItem.transform.SetAsFirstSibling();
  440. VisiteeLastDisplayIndex--;
  441. VisiteeFirstDisplayIndex--;
  442. }
  443. if (revertAmt > 0)
  444. {
  445. CommentScrollRect.content.position += new Vector3(0, revertAmt* CommentItemHeight, 0);
  446. CommentScrollRect.AddContentOffset(new Vector3(0, revertAmt* CommentItemHeight, 0));
  447. }
  448. }
  449. }
  450. }
  451. public static void ClearCommentPanel()
  452. {
  453. int childAmt = CommentScrollRect.content.childCount;
  454. for (int i = 0; i < childAmt; i++)
  455. {
  456. CommentItem commentItem = CommentScrollRect.content.GetChild(0).GetComponent<CommentItem>();
  457. ResourceManager.Save(commentItem);
  458. CommentItems.Remove(commentItem);
  459. }
  460. CommentScrollRect.verticalNormalizedPosition = 1;
  461. }
  462. public static void OnScroll(Vector2 position)
  463. {
  464. if (PullCommentDataFlag)
  465. {
  466. return;
  467. }
  468. if (CommentScrollRect.content.childCount == 0)
  469. {
  470. return;
  471. }
  472. if (position.y >= 1)
  473. {
  474. PreviousCommentPage(IsPlayer);
  475. }
  476. if (position.y <= 0)
  477. {
  478. if (IsPlayer)
  479. {
  480. if (PlayerLastDisplayIndex == PlayerCommentDatas.Count - 1)
  481. {
  482. PullCommentPage(true);
  483. }
  484. else if (PlayerLastDisplayIndex < PlayerCommentDatas.Count - 1)
  485. {
  486. NextCommentPage(true, false);
  487. }
  488. }
  489. else
  490. {
  491. if (VisiteeLastDisplayIndex == VisiteeCommentDatas.Count - 1)
  492. {
  493. PullCommentPage(false);
  494. }
  495. else if (VisiteeLastDisplayIndex < VisiteeCommentDatas.Count - 1)
  496. {
  497. NextCommentPage(false, false);
  498. }
  499. }
  500. }
  501. }
  502. public static void OpenRankPanel()
  503. {
  504. AudioManager.PlayClip(AudioLabel.Bubble);
  505. ResourceManager.Get(ObjectLabel.S_RankBK).TweenForCG();
  506. }
  507. public static void CloseRankPanel()
  508. {
  509. AudioManager.PlayClip(AudioLabel.ClickButton);
  510. ResourceManager.Get(ObjectLabel.S_RankBK).TweenBacCG();
  511. }
  512. public static void RecordRankPanel()
  513. {
  514. OpenRankPanelFlag = true;
  515. }
  516. public static void RecoverRankPanel()
  517. {
  518. if (OpenRankPanelFlag)
  519. {
  520. OpenRankPanelFlag = false;
  521. OpenRankPanel();
  522. }
  523. }
  524. public static void InitRankPanel()
  525. {
  526. if (Initializer.Inited && HttpManager.IsRankDataReady)
  527. {
  528. for (int i = 0; i < HttpManager.RankDatas.Count; i++)
  529. {
  530. ResourceManager.GetRanktem((i + 1).ToString(), HttpManager.RankDatas[i][1].ToString(), HttpManager.RankDatas[i][0].ToString());
  531. }
  532. }
  533. }
  534. public static void OnCommentFriendFilterToggleClick(bool value)
  535. {
  536. AudioManager.PlayClip(ResourceLabel.BtnClip);
  537. if (value)
  538. {
  539. EnableCommentFriendFilter();
  540. }
  541. else
  542. {
  543. DisableCommentFriendFilter();
  544. }
  545. }
  546. public static void EnableCommentFriendFilter()
  547. {
  548. IsFriendFilterOn = true;
  549. foreach (var commentItem in CommentItems)
  550. {
  551. if (!commentItem.IsFriend(FriendPanel.FriendAccountDatas))
  552. {
  553. commentItem.SetActive(false);
  554. }
  555. }
  556. }
  557. public static void DisableCommentFriendFilter()
  558. {
  559. IsFriendFilterOn = false;
  560. foreach (var commentItem in CommentItems)
  561. {
  562. commentItem.SetActive(true);
  563. }
  564. }
  565. private static void OnFriendListRefresh(List<AccountData> accountDatas)
  566. {
  567. if (IsFriendFilterOn)
  568. {
  569. EnableCommentFriendFilter();
  570. }
  571. }
  572. public static void OnEnterVisiteeGarden()
  573. {
  574. ResourceManager.SetActive(ObjectLabel.C_NotifyParent, false);
  575. }
  576. public static void OnExitVisiteeGarden()
  577. {
  578. ResourceManager.SetActive(ObjectLabel.C_NotifyParent, true);
  579. }
  580. }