成员排序小修复
parent
d7e766509b
commit
3fa82b1241
|
|
@ -8,6 +8,7 @@ setmetatable(M, { __index = BaseWindow })
|
|||
|
||||
local function SortMembers(Members)
|
||||
|
||||
-- ↓↓↓去掉用户自己
|
||||
for _,player in pairs(Members) do
|
||||
if player.uid == DataManager.SelfUser.account_id then
|
||||
Members[_] = nil
|
||||
|
|
|
|||
|
|
@ -481,10 +481,17 @@ function M:ChangeNumber(fgCtr, group_id, limit, num, minus_only, sort_type)
|
|||
local player = self.members[index + 1]
|
||||
obj:GetChild('title').emojies = EmojiDitc.EmojiesDitc
|
||||
obj:GetChild('title').text = Utils.TextOmit(player.nick, 5, "...")
|
||||
obj:GetController('type').selectedIndex = player.online and player.online or 0
|
||||
if player.playing == "startPlaying" then
|
||||
obj:GetController('type').selectedIndex = 2
|
||||
|
||||
local state = 0
|
||||
if player.online == 1 and player.playing == "startPlaying" then
|
||||
state = 2
|
||||
elseif player.online == 1 and player.playing == "stopPlaying" then
|
||||
state = 1
|
||||
elseif player.online == 0 then
|
||||
state = 0
|
||||
end
|
||||
|
||||
obj:GetController('type').selectedIndex = state
|
||||
local loader_icon = obj:GetChild("btn_head"):GetChild("icon")
|
||||
ImageLoad.Load(player.portrait, loader_icon)
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue