package com.adealink.weparty.push

import com.adealink.frame.log.Log
import com.adealink.frame.network.INetworkService
import com.adealink.frame.push.IPushServiceConfig
import com.adealink.frame.push.data.PushMessage
import com.adealink.frame.push.data.TAG_PUSH
import com.adealink.weparty.App
import com.adealink.weparty.module.account.AccountModule

class PushServiceConfig: IPushServiceConfig {
    override fun getNetworkService(): INetworkService {
        return App.instance.networkService
    }

    override fun onReceivedPushMessage(pushMessage: PushMessage) {
        PushMessageManager.processPushMessage(pushMessage)
        Log.d(TAG_PUSH, "PushServiceConfig, onReceivedPushMessage:$pushMessage")
    }

    override fun isLogin(): Boolean {
        return AccountModule.isLogin()
    }

    override fun onNewToken(token: String) {
//        AttributionModule.updateServerUninstallToken(token)
    }
}