package com.adealink.weparty.crash

import android.content.Intent
import com.adealink.frame.crash.config.ICrashConfig
import com.adealink.frame.router.Router
import com.adealink.frame.util.AppUtil
import com.adealink.weparty.AppModule

class CrashConfig : ICrashConfig {

    override fun goHome() {
        val activity = AppUtil.currentActivity ?: return
        Router.build(activity, AppModule.Main.PATH)
            .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
            .start()
    }

}