Skip to content

Swiping on the last item in explore featured tab takes you to uploaded via mobile. #4215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4D17Y4 opened this issue Feb 6, 2021 · 11 comments · Fixed by #4227 or #4729
Closed

Swiping on the last item in explore featured tab takes you to uploaded via mobile. #4215

4D17Y4 opened this issue Feb 6, 2021 · 11 comments · Fixed by #4227 or #4729

Comments

@4D17Y4
Copy link
Contributor

4D17Y4 commented Feb 6, 2021

Summary:

When you swipe on the last item in explore featured fragment it gets to uploaded via mobile.

Steps to reproduce:
go to the last item of the featured tab and swipe left, you'll notice you're taken to uploaded via mobile.

  • this issue also exist in bookmark fragment.

What did you expect the app to do, and what did you see instead?

This is not the major issue but when we click on media in this uploaded via mobile tab, the app shows some unexpected behavior when returning from the media details.

Device and Android version:

Nokia 6.1 android version 10 (stock).
Commons app version:

Latest master.

Screen recording

ezgif com-resize

Observations:

  • First we can see that 'Uploaded from mobile/featured' tabs are not there.
  • Media details work perfectly fine.
  • On returning from details 'Uploaded from mobile/featured' tabs are restored.
  • On switching to featured we see that the list fragment is replaced by the view pager which does not allow vertical scroll between items although scrolling horizontally is possible as in view pager.

Would you like to work on the issue?

Please let us know whether you want to fix the issue by yourself. If not, anyone can get the issue assigned to them.
Yes.

@4D17Y4
Copy link
Contributor Author

4D17Y4 commented Feb 6, 2021

@misaochan ,
Assign me this one.

@4D17Y4
Copy link
Contributor Author

4D17Y4 commented Feb 6, 2021

For the solution part,
I'm thinking of restricting the user from swiping to get to the 'uploaded from mobile' that will remove any abnormal behaviour on returning or tapping an item.
@nicolas-raoul , @madhurgupta10 for suggestions.

@madhurgupta10
Copy link
Collaborator

@4D17Y4 Hi, could you please add a screen recording of the current behaviour?

@4D17Y4
Copy link
Contributor Author

4D17Y4 commented Feb 8, 2021

@madhurgupta10, I've updated the issue, added the recording.
The major issue is the last one according to me.

@madhurgupta10
Copy link
Collaborator

@4D17Y4 Thanks for the details, this happens only when there is no network or slow network and async loading isn't continuing in the background.

Feel free to work on it if you are not working/assigned any other issue at the moment.

@4D17Y4
Copy link
Contributor Author

4D17Y4 commented Feb 12, 2021

this happens only when there is no network or slow network and async loading isn't continuing in the background.

I don't find any connection with network and the view pager nested swipes not configured properly.
Can u explain it , it'll help me in tackling the issue efficiently.

Will start working on it .
Thx.

@nicolas-raoul
Copy link
Member

I can reproduce the issue even with a good mobile connection, if I swipe very fast for a minute.
Maybe I have to swipe faster than the next page loads.

@4D17Y4
Copy link
Contributor Author

4D17Y4 commented Feb 14, 2021

Yes, @nicolas-raoul
U can see this issue in bookmarks too where loading isn't an issue if u haven't bookmarked many of them.
I have linked a PR that solves the issue in both explore and favorites fragment.
Waiting for review and suggestions ; )

nicolas-raoul pushed a commit that referenced this issue Feb 15, 2021
…ou to uploaded via mobile" (#4227)

* scrolling disabled on media details

* javadoc added

* javadoc modified
@Pratham2305
Copy link
Contributor

@nicolas-raoul @madhurgupta10 I think this issue still exists, I can reproduce it on the latest master.

@4D17Y4
Copy link
Contributor Author

4D17Y4 commented Dec 12, 2021

Hey @Pratham2305, the issue still exist.
I've gone through the code and I believe a commit under #4446 made some change that affected the PR fix.

Code from current master

public void onMediaClicked(int position) {
container.setVisibility(View.VISIBLE);
((ExploreFragment) getParentFragment()).tabLayout.setVisibility(View.GONE);
mediaDetails = new MediaDetailPagerFragment(false, true);
setFragment(mediaDetails, listFragment);
mediaDetails.showImage(position);
}

As one can notice
((ExploreFragment) getParentFragment()).setScroll(false);
is missing.

A quick fix would be to add this line.
I think It would be good to take a look at the specific commit that did the change just to be sure.

@Pratham2305
Copy link
Contributor

@4D17Y4 Thanks for pointing out, I have checked the commit, and Yes that is the only line missing. Now it's working fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment