1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-12-23 05:16:58 +00:00

remove feed timeout due to complaints

This commit is contained in:
Austin Huang 2020-12-25 11:21:44 -05:00
parent e539e426df
commit c40a0033db
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with 7 additions and 8 deletions

View File

@ -1,7 +1,7 @@
package awais.instagrabber.asyncs;
import android.os.Handler;
import android.util.Log;
//import android.os.Handler;
//import android.util.Log;
import java.util.ArrayList;
import java.util.List;
@ -21,13 +21,13 @@ public class FeedPostFetchService implements PostFetcher.PostFetchService {
private static final String TAG = "FeedPostFetchService";
private final FeedService feedService;
private String nextCursor;
private final Handler handler;
// private final Handler handler;
private boolean hasNextPage;
private static final int DELAY_MILLIS = 500;
// private static final int DELAY_MILLIS = 500;
public FeedPostFetchService() {
feedService = FeedService.getInstance();
handler = new Handler();
// handler = new Handler();
}
@Override
@ -49,9 +49,9 @@ public class FeedPostFetchService implements PostFetcher.PostFetchService {
feedModels.addAll(result.getFeedModels());
if (fetchListener != null) {
if (feedModels.size() < 15 && hasNextPage) {
handler.postDelayed(() -> {
// handler.postDelayed(() -> {
feedService.fetch(csrfToken, nextCursor, this);
}, DELAY_MILLIS);
// }, DELAY_MILLIS);
}
else {
fetchListener.onResult(feedModels);

View File

@ -91,7 +91,6 @@ public class StoriesService extends BaseService {
private void parseStoriesBody(final String body, final ServiceCallback<List<FeedStoryModel>> callback) {
try {
Log.d("austin_debug", body);
final List<FeedStoryModel> feedStoryModels = new ArrayList<>();
final JSONArray feedStoriesReel = new JSONObject(body).getJSONArray("tray");
for (int i = 0; i < feedStoriesReel.length(); ++i) {