【公会援助】 每次点击援助,列表都会重新置顶显示----3
parent
4cbb65c73b
commit
f20c58dc96
|
@ -121,6 +121,7 @@ function EveryDayGift:OnShow(_sortingOrder)
|
|||
self.titleTip.gameObject:SetActive(true)
|
||||
else
|
||||
self.titleTip.gameObject:SetActive(false)
|
||||
|
||||
end
|
||||
|
||||
if self.actConfig.Id == 63 then
|
||||
|
@ -163,6 +164,7 @@ function EveryDayGift:RefreshGiftData(isTop,isAni)
|
|||
if self.shopData[i].DataType == DynamicActivityManager.selectIndex.dataType then
|
||||
for j = 1 , #DynamicActivityManager.selectIndex.goodsId do
|
||||
if (self.shopData[i].data.shopData.id or self.shopData[i].data.shopData.goodsId) == DynamicActivityManager.selectIndex.goodsId[j] then
|
||||
DynamicActivityManager.SetSelectIndex(0,{})
|
||||
curindex = i
|
||||
break
|
||||
end
|
||||
|
@ -172,10 +174,13 @@ function EveryDayGift:RefreshGiftData(isTop,isAni)
|
|||
break
|
||||
end
|
||||
end
|
||||
if curindex ~= 0 then
|
||||
--LogGreen("curindex:"..curindex)
|
||||
self.scrollView:SetIndex(curindex)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function EveryDayGift:isBought()
|
||||
for i = 1, #self.shopData do
|
||||
if self.shopData[i].data.boughtNum > 0 then
|
||||
|
|
|
@ -322,9 +322,10 @@ function this:SetData(dataList, updateFunc, noTop, noAnim)
|
|||
-- 判断是否回到顶部,否则保持不动
|
||||
if noTop then
|
||||
local oldPosY = self.dragGOTran.anchoredPosition.y
|
||||
local oldPosX = self.dragGOTran.anchoredPosition.x
|
||||
local showIndex = self:CalShowIndex()
|
||||
self:SetShow(showIndex)
|
||||
self.dragGOTran.anchoredPosition = Vector2.New(0, oldPosY)
|
||||
self.dragGOTran.anchoredPosition = Vector2.New(oldPosX, oldPosY)
|
||||
else
|
||||
self:SetShow(1)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue