package com.cartoon.live.wallpaper.myviewmode;

import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.ViewModelStoreOwner;

public class BaseVm implements ViewModelStoreOwner {
    private final static BaseVm sInstance = new BaseVm();
    private ViewModelStore mAppViewModelStore;

    private BaseVm() {
    }

    public static BaseVm getInstance() {
        return sInstance;
    }

    @NonNull
    @Override
    public ViewModelStore getViewModelStore() {
        if (mAppViewModelStore == null) mAppViewModelStore = new ViewModelStore();
        return mAppViewModelStore;
    }
}
