package com.mime.dualscreenview.dialog

import android.app.Dialog
import androidx.activity.ComponentDialog
import java.lang.Exception

object DialogManager {
    val dialogs = arrayListOf<ComponentDialog>()
    fun add(item : ComponentDialog) = dialogs.add(item)
    fun closeAll() {
        for (dialog in dialogs) {
            try {
                dialog?.dismiss()
            } catch(e : Exception) {

            }
        }
    }
}