From 65d19d860ec36599797d07cb0d32695c87c226b6 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Wed, 2 Sep 2020 14:11:28 -0400 Subject: [PATCH] fixed basic build errors, erase BasePostViewModel --- .../DirectMessageThreadFragment.java | 2 +- .../main/viewmodels/BasePostViewModel.java | 14 ++++---------- .../main/viewmodels/ViewerPostViewModel.java | 2 +- .../instagrabber/models/enums/PostItemType.java | 10 +++++----- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java index 013cfb70..5022fb76 100644 --- a/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/directmessages/DirectMessageThreadFragment.java @@ -84,7 +84,7 @@ public class DirectMessageThreadFragment extends Fragment { private DirectItemModel directItemModel; private RecyclerView messageList; // private AppCompatImageView dmInfo, dmSeen; - private boolean hasSentSomething, hasDeletedSomething; + private boolean hasDeletedSomething; private boolean hasOlder = true; public static boolean hasSentSomething; 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 5bd1eff0..4dba6f4a 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 @@ -5,15 +5,9 @@ import androidx.lifecycle.ViewModel; import java.util.List; -import awais.instagrabber.models.DiscoverItemModel; +import awais.instagrabber.models.BasePostModel; -public class DiscoverItemViewModel extends ViewModel { - private MutableLiveData> list; - - public MutableLiveData> getList() { - if (list == null) { - list = new MutableLiveData<>(); - } - return list; - } +public class BasePostViewModel extends ViewModel { + // this file was somehow identical to DiscoverItemViewModel + // pretty sure you didn't meant to do that } \ 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 d8352807..de935620 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 @@ -6,7 +6,7 @@ import java.util.List; import awais.instagrabber.models.ViewerPostModel; -public class ViewPostViewModel extends BasePostViewModel { +public class ViewerPostViewModel extends BasePostViewModel { private MutableLiveData> list; public MutableLiveData> getList() { diff --git a/app/src/main/java/awais/instagrabber/models/enums/PostItemType.java b/app/src/main/java/awais/instagrabber/models/enums/PostItemType.java index 3bd66713..4bd0269d 100644 --- a/app/src/main/java/awais/instagrabber/models/enums/PostItemType.java +++ b/app/src/main/java/awais/instagrabber/models/enums/PostItemType.java @@ -2,9 +2,9 @@ package awais.instagrabber.models.enums; import java.io.Serializable; -public enum ItemGetType implements Serializable { - MAIN_ITEMS, - DISCOVER_ITEMS, - FEED_ITEMS, - SAVED_ITEMS +public enum PostItemType implements Serializable { + MAIN, + DISCOVER, + FEED, + SAVED } \ No newline at end of file