Skip to content
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

Search Text Controller Disposed When Playing/Dismissing A Video #1965

Closed
3 tasks done
akano12 opened this issue Nov 21, 2022 · 7 comments · Fixed by #3831
Closed
3 tasks done

Search Text Controller Disposed When Playing/Dismissing A Video #1965

akano12 opened this issue Nov 21, 2022 · 7 comments · Fixed by #3831
Labels
bug Something isn't working help wanted Looking for help

Comments

@akano12
Copy link
Collaborator

akano12 commented Nov 21, 2022

Steps to reproduce

  1. Search for something
  2. Play the video (playing and clicking back btn would cause the issue)
  3. Close the video (dismissing a video cause the same issue)

Expected behavior

Nothing should affect the text controller

Actual behavior

Search controller is disposed

LibreTube version

0.8.0

Android version

12

Other details

Playing or dismissing a video would clear the search text controller and close the search bar.

Screen_Recording_20221121_180645_LibreTube.mp4

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • I have written a short but informative title.
  • I will fill out all of the requested information in this form.
@akano12 akano12 added the bug Something isn't working label Nov 21, 2022
@akano12 akano12 changed the title Search Text Controller Disposed When Closing A Video Search Text Controller Disposed When Playing/Dismissing A Video Nov 21, 2022
@Bnyro Bnyro added the help wanted Looking for help label Jan 14, 2023
@akano12 akano12 mentioned this issue Jan 23, 2023
3 tasks
@Bnyro Bnyro mentioned this issue Feb 14, 2023
3 tasks
@massirm-rf
Copy link

massirm-rf commented Mar 23, 2023

I reproduced the issue and I will try to work on it

@SajalRG
Copy link
Contributor

SajalRG commented May 23, 2023

Hi, I'm able to reproduce this issue in version 0.14.1, Pixel 2 API 32 emulator with GMS.
I've also analysed this issue. Below are two different root cause I've found so far:

Issue#1

  1. Search for something
  2. Play the video (playing and clicking back btn would cause the issue)

Issue#2

  1. Search for something
  2. Play the video
  3. Close the video (dismissing a video cause the same issue)

I'm able to fix, Issue#1, but not sure of regressions, still checking. I'm just returning false in MainActivity onMenuItemActionCollapse

For Issue#2, looks like onCreateOptionsMenu getting called when PlayerFragment is closed. Still debugging.

@akano12
Copy link
Collaborator Author

akano12 commented May 23, 2023

I've also analysed this issue. Below are two different root cause I've found so far:

You've found? You literally copied what I've already said up above.

You can also reproduce it by playing a different a video (search -> play video -> minimize video -> play a different video)

@SajalRG
Copy link
Contributor

SajalRG commented May 23, 2023

Hi @akano12 ,

You're correct, I've literally copy pasted your issue statement from description. I've just listed them separately based on root cause as per my analysis of the code. This seggeration is basically to help me (and hopefully others) understand and debug the issue.

My statement in previous comment was not to claim I've found the issue itself. I hope it's clarified now.

I was also able to reproduce playing different video as well but I'm assuming that root cause is same as Issue#2 but haven't thoroughly checked that part. Thanks for pointing it out.

Edit: I'm new to contributing in open source code. So if there is any specific lingo I need to use to convey certain updates, then any help or pointers in that direction is appreciated. My intention here is not to offend anyone or claim other's contribution as my own.

@Bnyro
Copy link
Member

Bnyro commented May 23, 2023

Hey @SajalRG,

no worries, everything you did is just fine. I'm happy to see you trying to debug the issues and sharing what you figured out so far is a good idea.

There's nothing specifically you need to worry about here, the only limitation is our code of conduct (can be found in the project's root dir) but I doubt you would have done anything differently there anyways.

If you're able to fix one or two of the issues (e.g. with what you mentioned above) feel free to create a pull request, so it can be tested by others too to check if it's working and there are no major regressions / drawbacks.

@akano12
Copy link
Collaborator Author

akano12 commented May 23, 2023

Edit: I'm new to contributing in open source code. So if there is any specific lingo I need to use to convey certain updates, then any help or pointers in that direction is appreciated. My intention here is not to offend anyone or claim other's contribution as my own.

No worries mate, wasn't trying to be rude anyway.

Well, the main pillars of open source code/community are to give credit where it's due (doesn't matter, small opinions or big contributions), and to contribute by whichever things you can do (donations/bug reports/testing and reporting/pull requests..).

SajalRG added a commit to SajalRG/LibreTube that referenced this issue May 24, 2023
Issue libre-tube#1965:
* Search for something
* Play the video
* Clicking back btn would close the search also

Fix:
Disable auto close of search in onMenuItemActionCollapse method call.
Search will close when search fragment is removed.

Known Issues:
Search will still close when player fragment is closed.
@SajalRG
Copy link
Contributor

SajalRG commented May 25, 2023

Hi,

For second issue, looks like android issue it got fixed in "androidx.fragment:fragment:1.6.0-alpha07".
Source: https://issuetracker.google.com/issues/244336571

Currently I'm trying a workaround, will update PR soon. Also found one regression issue with previous PR, have fixed both issues together.

Regression Issue:

  1. Search for something
  2. Navigate to another page using bottom navigation

Here, the navigation bar looks wrong.

Edit: Fixed the regression issue as well in same PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Looking for help
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants