Remove retryLoadingMore in NewPostViewModel.

This commit is contained in:
Alex Ning 2021-09-06 23:14:36 +08:00
parent a239eec17c
commit 0b8e8076fc
3 changed files with 1 additions and 36 deletions

View File

@ -2014,8 +2014,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
} }
public interface Callback { public interface Callback {
void retryLoadingMore();
void typeChipClicked(int filter); void typeChipClicked(int filter);
void flairChipClicked(String flair); void flairChipClicked(String flair);

View File

@ -453,11 +453,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, true, windowWidth, accessToken, accountName, postType, postLayout, true,
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() { mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
public void retryLoadingMore() {
mPostViewModel.retryLoadingMore();
}
@Override @Override
public void typeChipClicked(int filter) { public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class); Intent intent = new Intent(activity, FilteredPostsActivity.class);
@ -535,11 +530,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, displaySubredditName, windowWidth, accessToken, accountName, postType, postLayout, displaySubredditName,
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() { mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
public void retryLoadingMore() {
mPostViewModel.retryLoadingMore();
}
@Override @Override
public void typeChipClicked(int filter) { public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class); Intent intent = new Intent(activity, FilteredPostsActivity.class);
@ -611,11 +601,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, true, windowWidth, accessToken, accountName, postType, postLayout, true,
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() { mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
public void retryLoadingMore() {
mPostViewModel.retryLoadingMore();
}
@Override @Override
public void typeChipClicked(int filter) { public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class); Intent intent = new Intent(activity, FilteredPostsActivity.class);
@ -681,11 +666,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, true, windowWidth, accessToken, accountName, postType, postLayout, true,
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() { mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
public void retryLoadingMore() {
mPostViewModel.retryLoadingMore();
}
@Override @Override
public void typeChipClicked(int filter) { public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class); Intent intent = new Intent(activity, FilteredPostsActivity.class);
@ -747,11 +727,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, true, windowWidth, accessToken, accountName, postType, postLayout, true,
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() { mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
public void retryLoadingMore() {
mPostViewModel.retryLoadingMore();
}
@Override @Override
public void typeChipClicked(int filter) { public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class); Intent intent = new Intent(activity, FilteredPostsActivity.class);
@ -806,11 +781,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, true, windowWidth, accessToken, accountName, postType, postLayout, true,
mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences,
mExoCreator, new PostRecyclerViewAdapter.Callback() { mExoCreator, new PostRecyclerViewAdapter.Callback() {
@Override
public void retryLoadingMore() {
mPostViewModel.retryLoadingMore();
}
@Override @Override
public void typeChipClicked(int filter) { public void typeChipClicked(int filter) {
Intent intent = new Intent(activity, FilteredPostsActivity.class); Intent intent = new Intent(activity, FilteredPostsActivity.class);

View File

@ -199,6 +199,7 @@ public class NewPostViewModel extends ViewModel {
paging3PagingSource = new PostPaging3PagingSource(executor, retrofit, accessToken, accountName, paging3PagingSource = new PostPaging3PagingSource(executor, retrofit, accessToken, accountName,
sharedPreferences, postFeedScrolledPositionSharedPreferences, name, query, trendingSource, sharedPreferences, postFeedScrolledPositionSharedPreferences, name, query, trendingSource,
postType, sortType, postFilter, readPostList); postType, sortType, postFilter, readPostList);
break;
default: default:
//User //User
paging3PagingSource = new PostPaging3PagingSource(executor, retrofit, accessToken, accountName, paging3PagingSource = new PostPaging3PagingSource(executor, retrofit, accessToken, accountName,
@ -222,10 +223,6 @@ public class NewPostViewModel extends ViewModel {
postFilterLiveData.postValue(postFilter); postFilterLiveData.postValue(postFilter);
} }
public void retryLoadingMore() {
}
public static class Factory extends ViewModelProvider.NewInstanceFactory { public static class Factory extends ViewModelProvider.NewInstanceFactory {
private Executor executor; private Executor executor;
private Retrofit retrofit; private Retrofit retrofit;