mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-18 04:37:30 +00:00
Fix viewmodels
This commit is contained in:
parent
65d19d860e
commit
daa5a110f2
@ -1,13 +1,9 @@
|
||||
package awais.instagrabber.fragments.main.viewmodels;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import awais.instagrabber.models.BasePostModel;
|
||||
|
||||
public class BasePostViewModel extends ViewModel {
|
||||
// this file was somehow identical to DiscoverItemViewModel
|
||||
// pretty sure you didn't meant to do that
|
||||
public class BasePostViewModel<T extends BasePostModel> extends ViewModel {
|
||||
|
||||
}
|
@ -1,15 +1,16 @@
|
||||
package awais.instagrabber.fragments.main.viewmodels;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import awais.instagrabber.models.ViewerPostModel;
|
||||
import awais.instagrabber.models.ViewerPostModelWrapper;
|
||||
|
||||
public class ViewerPostViewModel extends BasePostViewModel<ViewerPostModel> {
|
||||
private MutableLiveData<List<ViewerPostModel>> list;
|
||||
public class ViewerPostViewModel extends ViewModel {
|
||||
private MutableLiveData<List<ViewerPostModelWrapper>> list;
|
||||
|
||||
public MutableLiveData<List<ViewerPostModel>> getList() {
|
||||
public MutableLiveData<List<ViewerPostModelWrapper>> getList() {
|
||||
if (list == null) {
|
||||
list = new MutableLiveData<>();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user