mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 14:47:29 +00:00
remove feed timeout due to complaints
This commit is contained in:
parent
e539e426df
commit
c40a0033db
@ -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);
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user