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 {
void retryLoadingMore();
void typeChipClicked(int filter);
void flairChipClicked(String flair);

View File

@ -453,11 +453,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, true,
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);
@ -535,11 +530,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, displaySubredditName,
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);
@ -611,11 +601,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, true,
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);
@ -681,11 +666,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, true,
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);
@ -747,11 +727,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, true,
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);
@ -806,11 +781,6 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
windowWidth, accessToken, accountName, postType, postLayout, true,
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);

View File

@ -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;