| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | if (!IsSatisfyShowChannel(ChatCtrl.Inst.presentChatType))
|
| | | {
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.System;
|
| | | }
|
| | |
|
| | | m_ChatSend.parent = this;
|
| | | ChatCtrl.Inst.lockUpdate = false;
|
| | | ChatCtrl.Inst.OnPteChatChangeEvent += OnPteChatChangeEvent;
|
| | |
| | | m_ChannelControl.Refresh();
|
| | | for (int i = 0; i < chatCenter.chatChannels.Count; i++)
|
| | | {
|
| | | m_ChannelControl.AddCell(ScrollerDataType.Normal, (int)chatCenter.chatChannels[i], OnChannelSelect);
|
| | | if (IsSatisfyShowChannel(chatCenter.chatChannels[i]))
|
| | | {
|
| | | m_ChannelControl.AddCell(ScrollerDataType.Normal, (int)chatCenter.chatChannels[i], OnChannelSelect);
|
| | | }
|
| | | }
|
| | | m_ChannelControl.Restart();
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private bool IsSatisfyShowChannel(ChatInfoType channel)
|
| | | {
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | if (channel == ChatInfoType.Team || channel == ChatInfoType.Invite)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | private void OnPteChatChangeEvent()
|
| | | {
|
| | | if (ChatCtrl.Inst.presentChatType == ChatInfoType.Friend)
|