package com.zxhy.simplefilesmanager.simplefile

import android.content.Context
import android.net.Uri
import androidx.lifecycle.viewModelScope
import com.zxhy.simplefilesmanager.simpleCommon.SimpleCommonViewModel
import com.zxhy.simplefilesmanager.simplejoke.JoMediajoStoreEx.recentImage
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

class SimpleFileViewModel() : SimpleCommonViewModel() {

    fun joloadjoRecentImage(context: Context, gggAction: (uris: List<Uri>) -> Unit) =
        viewModelScope.launch(Dispatchers.IO) {
            val list = recentImage(context)
            gggAction.invoke(list)
        }
}