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