slot0 = class("RedPacketMediator", import("...base.ContextMediator")) function slot0.register(slot0) end function slot0.listNotificationInterests(slot0) return { ActivityProxy.ACTIVITY_SHOW_RED_PACKET_AWARDS, ActivityProxy.ACTIVITY_UPDATED } end function slot0.handleNotification(slot0, slot1) slot3 = slot1:getBody() if slot1:getName() == ActivityProxy.ACTIVITY_SHOW_RED_PACKET_AWARDS then slot0.viewComponent:emit(BaseUI.ON_ACHIEVE, slot3.awards, slot3.callback) elseif slot2 == ActivityProxy.ACTIVITY_UPDATED and slot3.id == slot0.viewComponent.activityID then slot0.viewComponent:onSubmitFinished() end end return slot0