setHome挪到group连接
parent
3e70cdd0ca
commit
2b596d4dba
|
|
@ -86,6 +86,11 @@ end
|
|||
|
||||
----------------------请求------------------------------------
|
||||
function M:connect(host, groupId, callback)
|
||||
|
||||
if self.connecting then
|
||||
self:disconnect()
|
||||
end
|
||||
|
||||
self.host = host
|
||||
self.groupId = groupId
|
||||
self.connecting = true
|
||||
|
|
@ -100,6 +105,7 @@ function M:connect(host, groupId, callback)
|
|||
_mgr_client.onconnect:Add(function(code)
|
||||
self.code = code
|
||||
if (code == SocketCode.Connect) then
|
||||
print("GroupMgrController已连接", code)
|
||||
local _data = {}
|
||||
_data.session = ControllerManager.WebClient:getSession()
|
||||
if _data.session == nil then
|
||||
|
|
@ -109,11 +115,8 @@ function M:connect(host, groupId, callback)
|
|||
return
|
||||
end
|
||||
_data.groupId = self.groupId
|
||||
--printlog(debug.traceback())
|
||||
--printlog("session===1111111111>>>", _data.session)
|
||||
--pt(_data)
|
||||
_mgr_client:send(Protocol.FGMGR_ENTER_GROUP, _data, function(res)
|
||||
self.connecting = false
|
||||
--self.connecting = false
|
||||
if res.ReturnCode == 0 then
|
||||
-- printlog("2222222222222222222222222222222")
|
||||
-- pt(res)
|
||||
|
|
@ -177,6 +180,7 @@ function M:connect(host, groupId, callback)
|
|||
end
|
||||
|
||||
function M:disconnect()
|
||||
print("GroupMgrController disconnect")
|
||||
self.connecting = false
|
||||
if self._mgr_client then
|
||||
self._mgr_client:destroy()
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ local function SortMembers(Members)
|
|||
local offline = {}
|
||||
|
||||
for _, player in pairs(Members) do
|
||||
|
||||
-- 在线 绿色状态
|
||||
if player.online == 1 and player.playing == "stopPlaying" then
|
||||
online[#online + 1] = player
|
||||
|
|
@ -75,6 +74,8 @@ local function SortMembers(Members)
|
|||
end
|
||||
|
||||
function FamilyView.new()
|
||||
--print("刘海屏Rect x:%s, y:%s, height:%s, width:%s", Screen.safeArea.x, Screen.safeArea.y, Screen.safeArea.height,Screen.safeArea.width)
|
||||
|
||||
UIPackage.AddPackage("base/Family/ui/Family")
|
||||
|
||||
setmetatable(M, { __index = BaseView })
|
||||
|
|
@ -195,6 +196,7 @@ function M:InitCloseClick()
|
|||
FamilyOffline(self._group.id, self)
|
||||
end
|
||||
|
||||
self._mgr_ctr:disconnect()
|
||||
ControllerManager.ChangeController(LoddyController)
|
||||
ViewManager.ChangeView(ViewManager.View_Lobby)
|
||||
else
|
||||
|
|
@ -394,7 +396,6 @@ function M:BanDeskmate()
|
|||
end
|
||||
|
||||
function M:ReflashMember()
|
||||
|
||||
self.members = SortMembers(self._group.members)
|
||||
|
||||
local list_familyNumber = self._view:GetChild('list_familyNumber')
|
||||
|
|
@ -1042,7 +1043,6 @@ function M:RefalshMoreBtn()
|
|||
end
|
||||
|
||||
function M:ReflashChatRoomRedPoint()
|
||||
|
||||
self.cChatRoomRedPoint.selectedIndex = 0
|
||||
|
||||
if self._group.messageCount > 0 then
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ function OnApplicationPause()
|
|||
ViewManager.OnApplicationPause()
|
||||
|
||||
local gMgr = ControllerManager.GetController(GroupMgrController)
|
||||
if gMgr then
|
||||
if gMgr and gMgr.connecting then
|
||||
gMgr:FG_Set_Home("out")
|
||||
end
|
||||
end
|
||||
|
|
@ -312,7 +312,7 @@ function OnApplicationActive()
|
|||
ViewManager.OnApplicationActive()
|
||||
|
||||
local gMgr = ControllerManager.GetController(GroupMgrController)
|
||||
if gMgr then
|
||||
if gMgr and gMgr.connecting then
|
||||
gMgr:FG_Set_Home("enter")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue