aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-09-06 15:14:36 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-09-06 15:14:36 +0000
commit0b8e8076fc725023966f2ce737ebfbbd342eac04 (patch)
tree5f33b571199f7f018e0460c879af97746953141e /app/src/main/java/ml/docilealligator/infinityforreddit
parenta239eec17ccde03690dadf3068984744e71039af (diff)
downloadinfinity-for-reddit-0b8e8076fc725023966f2ce737ebfbbd342eac04.tar
infinity-for-reddit-0b8e8076fc725023966f2ce737ebfbbd342eac04.tar.gz
infinity-for-reddit-0b8e8076fc725023966f2ce737ebfbbd342eac04.tar.bz2
infinity-for-reddit-0b8e8076fc725023966f2ce737ebfbbd342eac04.tar.lz
infinity-for-reddit-0b8e8076fc725023966f2ce737ebfbbd342eac04.tar.xz
infinity-for-reddit-0b8e8076fc725023966f2ce737ebfbbd342eac04.tar.zst
infinity-for-reddit-0b8e8076fc725023966f2ce737ebfbbd342eac04.zip
Remove retryLoadingMore in NewPostViewModel.
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java30
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/post/NewPostViewModel.java5
3 files changed, 1 insertions, 36 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
index 25125992..df1f36ee 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
@@ -2014,8 +2014,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
}
public interface Callback {
- void retryLoadingMore();
-
void typeChipClicked(int filter);
void flairChipClicked(String flair);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
index 57208029..3c32e1be 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
@@ -454,11 +454,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
- public void retryLoadingMore() {
- mPostViewModel.retryLoadingMore();
- }
-
- @Override
public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class);
intent.putExtra(FilteredPostsActivity.EXTRA_NAME, subredditName);
@@ -536,11 +531,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
- public void retryLoadingMore() {
- mPostViewModel.retryLoadingMore();
- }
-
- @Override
public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class);
intent.putExtra(FilteredPostsActivity.EXTRA_NAME, subredditName);
@@ -612,11 +602,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
- public void retryLoadingMore() {
- mPostViewModel.retryLoadingMore();
- }
-
- @Override
public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class);
intent.putExtra(FilteredPostsActivity.EXTRA_NAME, multiRedditPath);
@@ -682,11 +667,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
- public void retryLoadingMore() {
- mPostViewModel.retryLoadingMore();
- }
-
- @Override
public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class);
intent.putExtra(FilteredPostsActivity.EXTRA_NAME, username);
@@ -748,11 +728,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
- public void retryLoadingMore() {
- mPostViewModel.retryLoadingMore();
- }
-
- @Override
public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class);
intent.putExtra(FilteredPostsActivity.EXTRA_POST_TYPE, postType);
@@ -807,11 +782,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
- public void retryLoadingMore() {
- mPostViewModel.retryLoadingMore();
- }
-
- @Override
public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class);
intent.putExtra(FilteredPostsActivity.EXTRA_POST_TYPE, postType);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/post/NewPostViewModel.java b/app/src/main/java/ml/docilealligator/infinityforreddit/post/NewPostViewModel.java
index 3d28320a..35f19198 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/NewPostViewModel.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/post/NewPostViewModel.java
@@ -199,6 +199,7 @@ public class NewPostViewModel extends ViewModel {
paging3PagingSource = new PostPaging3PagingSource(executor, retrofit, accessToken, accountName,
sharedPreferences, postFeedScrolledPositionSharedPreferences, name, query, trendingSource,
postType, sortType, postFilter, readPostList);
+ break;
default:
//User
paging3PagingSource = new PostPaging3PagingSource(executor, retrofit, accessToken, accountName,
@@ -222,10 +223,6 @@ public class NewPostViewModel extends ViewModel {
postFilterLiveData.postValue(postFilter);
}
- public void retryLoadingMore() {
-
- }
-
public static class Factory extends ViewModelProvider.NewInstanceFactory {
private Executor executor;
private Retrofit retrofit;