public int GetUnreadCount(EChatChannel type, ulong ullUid = 0uL, uint dwLogicWorldId = 0u) { CChatChannel cChatChannel = this._getChannel(type, ullUid, dwLogicWorldId); if (cChatChannel == null) { cChatChannel = this.CreateChannel(type, ullUid, dwLogicWorldId); } return(cChatChannel.GetUnreadCount()); }
public static int FriendDataSortForChatFriendList(COMDT_FRIEND_INFO l, COMDT_FRIEND_INFO r) { if ((l != r) && ((l != null) && (r != null))) { CChatChannel friendChannel = Singleton <CChatController> .instance.model.channelMgr.GetFriendChannel(r.stUin.ullUid, r.stUin.dwLogicWorldId); CChatChannel channel2 = Singleton <CChatController> .instance.model.channelMgr.GetFriendChannel(l.stUin.ullUid, l.stUin.dwLogicWorldId); if (r.bIsOnline == l.bIsOnline) { if (friendChannel.GetUnreadCount() != channel2.GetUnreadCount()) { return(friendChannel.GetUnreadCount() - channel2.GetUnreadCount()); } if (r.dwPvpLvl > l.dwPvpLvl) { return(1); } if (r.dwPvpLvl < l.dwPvpLvl) { return(-1); } return(0); } if (l.bIsOnline < r.bIsOnline) { if (channel2.GetUnreadCount() > 0) { return(-1); } return(1); } if (r.bIsOnline < l.bIsOnline) { if (friendChannel.GetUnreadCount() > 0) { return(1); } return(-1); } } return(0); }
public int GetAllFriendUnreadCount() { int num = 0; for (int i = 0; i < this.FriendChannelList.Count; i++) { CChatChannel cChatChannel = this.FriendChannelList[i]; num += cChatChannel.GetUnreadCount(); } return(num); }
public int GetFriendTotal_UnreadCount() { int num = 0; for (int i = 0; i < this.FriendChannelList.Count; i++) { CChatChannel cChatChannel = this.FriendChannelList[i]; COMDT_FRIEND_INFO gameOrSnsFriend = Singleton <CFriendContoller> .instance.model.GetGameOrSnsFriend(cChatChannel.ullUid, cChatChannel.dwLogicWorldId); if (gameOrSnsFriend != null && gameOrSnsFriend.bIsOnline == 1) { num += cChatChannel.GetUnreadCount(); } } return(num); }