package com.gh.gamecenter.search

import android.app.Application
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.MutableLiveData
import com.gh.gamecenter.core.runOnIoThread
import com.gh.gamecenter.db.SearchHistoryDao

class SearchDefaultViewModel(application: Application) : AndroidViewModel(application) {

    val historySearchLiveData = MutableLiveData<List<String>>()
    var isExistHotSearch: Boolean = false
    var isExistHotTag: Boolean = false
    var isExistHistory: Boolean = false
    var isExistRankList: Boolean = false

    init {
        runOnIoThread {
            historySearchLiveData.postValue(SearchHistoryDao(application).all)
        }
    }

}