package com.xuqm.base.web

import android.content.Context
import android.content.Intent

object XWebViewHelper {
    fun startWebWithTopBar(context: Context, url: String, title: String?) {
        val intent: Intent = Intent(context, XWebViewActivity::class.java).apply {
            title?.let { putExtra("title", title) }
            putExtra("url", url)
            putExtra("hasTopBar", true)
        }
        context.startActivity(intent)
    }
    fun startWebNoTopBar(context: Context, url: String) {
        val intent: Intent = Intent(context, XWebViewActivity::class.java).apply {
            putExtra("url", url)
            putExtra("hasTopBar", false)
        }
        context.startActivity(intent)
    }
}