local SeasonPhotoSimpleAllViewMessage = BaseClass("SeasonPhotoSimpleAllViewMessage", SFSBaseMessage)
local base = SFSBaseMessage

function SeasonPhotoSimpleAllViewMessage:OnCreate(param)
  base.OnCreate(self)
end

function SeasonPhotoSimpleAllViewMessage:HandleMessage(t)
  base.HandleMessage(self, t)
  local errCode = t.errorCode
  if errCode ~= nil then
    UIUtil.ShowTipsId(errCode)
    return
  end
  if not table.IsNullOrEmpty(t.photoSimpleArr) then
    table.sort(t.photoSimpleArr, function(a, b)
      return a.season > b.season
    end)
    DataCenter.SeasonPhotoManager.hasSendAllView = true
    DataCenter.SeasonPhotoManager.photoSimpleArr = t.photoSimpleArr
    EventManager:GetInstance():Broadcast(EventId.SeasonPhotoSimpleAllView)
  end
end

return SeasonPhotoSimpleAllViewMessage
