package com.example.applock.viewmodel;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.example.applock.listener.QuerySoftListener;
import com.example.applock.roombase.AppEntity;
import com.example.applock.roombase.SoftWareLockRoom;

import java.util.List;

public class SoftWareLockVM extends ViewModel {
    private MutableLiveData<List<AppEntity>> mutableLiveDataApp = new MutableLiveData<>();

    public MutableLiveData<List<AppEntity>> getMutableLiveDataApp() {

        return mutableLiveDataApp;
    }
    public void UpDataAppLock(boolean lock){
        SoftWareLockRoom.QuerySoftRoom(lock, new QuerySoftListener() {
            @Override
            public void QueryResult(List<AppEntity> list) {
                mutableLiveDataApp.setValue(list);
            }
        });
    }
}
