This commit is contained in:
Ammar Githam 2020-11-15 21:55:07 +09:00
parent fececb5fd2
commit b3d41ccffa
3 changed files with 5 additions and 2 deletions

View File

@ -200,7 +200,7 @@ public class HashTagFragment extends Fragment implements SwipeRefreshLayout.OnRe
Utils.openEmailAddress(getContext(), emailId); Utils.openEmailAddress(getContext(), emailId);
} }
private void openPostDialog(final FeedModel feedModel, private void openPostDialog(@NonNull final FeedModel feedModel,
final View profilePicView, final View profilePicView,
final View mainPostImage, final View mainPostImage,
final int position) { final int position) {
@ -209,6 +209,7 @@ public class HashTagFragment extends Fragment implements SwipeRefreshLayout.OnRe
opening = true; opening = true;
new PostFetcher(feedModel.getShortCode(), newFeedModel -> { new PostFetcher(feedModel.getShortCode(), newFeedModel -> {
opening = false; opening = false;
if (newFeedModel == null) return;
openPostDialog(newFeedModel, profilePicView, mainPostImage, position); openPostDialog(newFeedModel, profilePicView, mainPostImage, position);
}).execute(); }).execute();
return; return;

View File

@ -198,7 +198,7 @@ public class LocationFragment extends Fragment implements SwipeRefreshLayout.OnR
Utils.openEmailAddress(getContext(), emailId); Utils.openEmailAddress(getContext(), emailId);
} }
private void openPostDialog(final FeedModel feedModel, private void openPostDialog(@NonNull final FeedModel feedModel,
final View profilePicView, final View profilePicView,
final View mainPostImage, final View mainPostImage,
final int position) { final int position) {
@ -207,6 +207,7 @@ public class LocationFragment extends Fragment implements SwipeRefreshLayout.OnR
opening = true; opening = true;
new PostFetcher(feedModel.getShortCode(), newFeedModel -> { new PostFetcher(feedModel.getShortCode(), newFeedModel -> {
opening = false; opening = false;
if (newFeedModel == null) return;
openPostDialog(newFeedModel, profilePicView, mainPostImage, position); openPostDialog(newFeedModel, profilePicView, mainPostImage, position);
}).execute(); }).execute();
return; return;

View File

@ -91,6 +91,7 @@ public class DiscoverFragment extends Fragment implements SwipeRefreshLayout.OnR
discoverService.topicalExplore(new DiscoverService.TopicalExploreRequest(), new ServiceCallback<DiscoverService.TopicalExploreResponse>() { discoverService.topicalExplore(new DiscoverService.TopicalExploreRequest(), new ServiceCallback<DiscoverService.TopicalExploreResponse>() {
@Override @Override
public void onSuccess(final DiscoverService.TopicalExploreResponse result) { public void onSuccess(final DiscoverService.TopicalExploreResponse result) {
if (result == null) return;
topicClusterViewModel.getList().postValue(result.getClusters()); topicClusterViewModel.getList().postValue(result.getClusters());
binding.swipeRefreshLayout.setRefreshing(false); binding.swipeRefreshLayout.setRefreshing(false);
} }