邮件容错

This commit is contained in:
xiekaidong 2023-06-16 16:59:54 +08:00
parent 7dae3a6ab5
commit 35a4f25366
2 changed files with 16 additions and 9 deletions

View File

@ -368,7 +368,6 @@ function SDKManager:showFullScreenAds(adsClickType, adCallback)
end
function SDKManager:adRewradAd(noReport)
Logger.logHighlight("-------------------")
ModuleManager.TaskManager:addTaskProgress(GConst.TaskConst.TASK_TYPE.X_WATCH_AD)
if not noReport then
-- BIReport:postAdEvent()

View File

@ -41,16 +41,10 @@ function MailCell:refresh(entity)
uiMap["mail_cell.bg_normal.claim_btn.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM))
uiMap["mail_cell.bg_read.claim_btn.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_READ))
uiMap["mail_cell.bg_normal.claim_btn"]:addClickListener(function()
if entity:canClaim() then
ModuleManager.MailManager:claimMail({entity:getId()})
end
self:claimMail(entity)
end)
uiMap["mail_cell.bg_ad.claim_btn"]:addClickListener(function()
if entity:canClaim() then
SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.MAIL, function()
ModuleManager.MailManager:claimMail({entity:getId()})
end)
end
self:claimMail(entity)
end)
uiMap["mail_cell.bg_read.claim_btn"]:addClickListener(function()
BIReport:postMailClick(entity:getId())
@ -105,4 +99,18 @@ function MailCell:refresh(entity)
end
end
function MailCell:claimMail(entity)
if not entity:canClaim() then
return
end
if entity:getIsAdMail() then
SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.MAIL, function()
ModuleManager.MailManager:claimMail({entity:getId()})
end)
elseif entity:getIsNormalMail() then
ModuleManager.MailManager:claimMail({entity:getId()})
end
end
return MailCell