package com.hd.live.wall.wallpapers.base;

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

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

    private VmOwner() {
    }

    public static VmOwner getInstance() {
        return sInstance;
    }

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