package com.cartoon.wallpapers.live.vm;

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

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

    private MyOwner() {
    }

    public static MyOwner getInstance() {
        return sInstance;
    }

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