Browse Source

Fix Posts not opening for anon users

renovate/org.robolectric-robolectric-4.x
Ammar Githam 4 years ago
parent
commit
c3de020f0e
  1. 6
      app/src/main/java/awais/instagrabber/fragments/HashTagFragment.java
  2. 6
      app/src/main/java/awais/instagrabber/fragments/LocationFragment.java

6
app/src/main/java/awais/instagrabber/fragments/HashTagFragment.java

@ -207,8 +207,10 @@ public class HashTagFragment extends Fragment implements SwipeRefreshLayout.OnRe
if (opening) return;
if (TextUtils.isEmpty(feedModel.getProfileModel().getUsername())) {
opening = true;
new PostFetcher(feedModel.getShortCode(), newFeedModel -> openPostDialog(newFeedModel, profilePicView, mainPostImage, position))
.execute();
new PostFetcher(feedModel.getShortCode(), newFeedModel -> {
opening = false;
openPostDialog(newFeedModel, profilePicView, mainPostImage, position);
}).execute();
return;
}
opening = true;

6
app/src/main/java/awais/instagrabber/fragments/LocationFragment.java

@ -205,8 +205,10 @@ public class LocationFragment extends Fragment implements SwipeRefreshLayout.OnR
if (opening) return;
if (TextUtils.isEmpty(feedModel.getProfileModel().getUsername())) {
opening = true;
new PostFetcher(feedModel.getShortCode(), newFeedModel -> openPostDialog(newFeedModel, profilePicView, mainPostImage, position))
.execute();
new PostFetcher(feedModel.getShortCode(), newFeedModel -> {
opening = false;
openPostDialog(newFeedModel, profilePicView, mainPostImage, position);
}).execute();
return;
}
opening = true;

Loading…
Cancel
Save