package com.ydl.ydlcommon.utils

import com.ydl.ydlcommon.base.BaseApp
import com.ydl.ydlcommon.base.config.YDLConstants

/**
 * author : Zhangwenchao
 * e-mail : zhangwch@yidianling.com
 * time   : 2018/01/29
 *
 * 提示信息的封装类，使用单例 toast，防止重复弹出提示
 */
class ModularUtils private constructor() {

    companion object {
        private fun getInstance(): ModularUtils {
            return Holder.INSTANCE
        }

        fun isYDL():Boolean {
            return YDLConstants.FROM_YDL.equals(BaseApp.instance.getGlobalConfig().appFrom)
        }
    }

    private object Holder {
        val INSTANCE = ModularUtils()
    }
}