From daa5a110f2a2a3d0c077940ed1eb64399bc4fd29 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Thu, 3 Sep 2020 18:44:02 +0900 Subject: [PATCH] Fix viewmodels --- .../fragments/main/viewmodels/BasePostViewModel.java | 8 ++------ .../fragments/main/viewmodels/ViewerPostViewModel.java | 9 +++++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/main/viewmodels/BasePostViewModel.java b/app/src/main/java/awais/instagrabber/fragments/main/viewmodels/BasePostViewModel.java index 4dba6f4a..8aecc190 100644 --- a/app/src/main/java/awais/instagrabber/fragments/main/viewmodels/BasePostViewModel.java +++ b/app/src/main/java/awais/instagrabber/fragments/main/viewmodels/BasePostViewModel.java @@ -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 extends ViewModel { + } \ No newline at end of file diff --git a/app/src/main/java/awais/instagrabber/fragments/main/viewmodels/ViewerPostViewModel.java b/app/src/main/java/awais/instagrabber/fragments/main/viewmodels/ViewerPostViewModel.java index de935620..04a63365 100644 --- a/app/src/main/java/awais/instagrabber/fragments/main/viewmodels/ViewerPostViewModel.java +++ b/app/src/main/java/awais/instagrabber/fragments/main/viewmodels/ViewerPostViewModel.java @@ -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 { - private MutableLiveData> list; +public class ViewerPostViewModel extends ViewModel { + private MutableLiveData> list; - public MutableLiveData> getList() { + public MutableLiveData> getList() { if (list == null) { list = new MutableLiveData<>(); }