package com.gh.common.prioritychain

import com.gh.gamecenter.common.entity.NotificationUgc
import com.gh.gamecenter.common.utils.NotificationHelper
import com.gh.gamecenter.login.user.UserManager

class NotificationPermissionDialogHandler(priority: Int) : PriorityChainHandler(priority) {

    override fun onProcess(): Boolean {
        // 仅登录后再启动光环时请求一次权限
        if (UserManager.getInstance().isLoggedIn) {
            NotificationHelper.showNotificationHintDialog(NotificationUgc.LOGIN) {
                processNext()
            }
            return true
        } else {
            processNext()
        }

        return false
    }

}