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

Fix search bar collapse while search in progress #3831

Merged
merged 1 commit into from
May 26, 2023

Conversation

SajalRG
Copy link
Contributor

@SajalRG SajalRG commented May 25, 2023

This is an AOSP bug where destroy of fragment calls invalideMenu of Activity even though the fragment does not participate in menu updates.

https://issuetracker.google.com/issues/244336571

Hence added an workaroud to not invalidate menu when search is in progress.

Closes #1965

@SajalRG SajalRG force-pushed the fix-search-bar-collapse branch from a3108f8 to e0d9105 Compare May 25, 2023 07:08
@SajalRG
Copy link
Contributor Author

SajalRG commented May 25, 2023

Verified all cases below working as expected.

  1. Search then open player and close player
  2. Search then open player and minimize player with back key
  3. Close player while search in progress and player minimized
  4. Switch videos from search release and then press back key
  5. Switch in bottom navigation while search in progress
  6. Open player from search, switch to audio mode and then press back

This PR closes Issue #1965

@FireMasterK
Copy link
Member

https://issuetracker.google.com/issues/244336571#comment22

Could this issue also be fixed if we just include the latest version of the dependency in LibreTube directly?

@SajalRG
Copy link
Contributor Author

SajalRG commented May 25, 2023

https://issuetracker.google.com/issues/244336571#comment22

Could this issue also be fixed if we just include the latest version of the dependency in LibreTube directly?

Yeah, I thought trying same but couldn't find where LibreTube including fragment dependency (i.e. androidx.fragment:fragment), hence added the workaround for now and shared for review.

Edit: Also as per the comment, the library is still not released and is in alpha stage. That comment was 2 months ago so not sure of actual release status though.

@Bnyro
Copy link
Member

Bnyro commented May 25, 2023

Tested it and can confirm this fixes the issue.
Awesome work, happy we can finally close this issue!

This is an AOSP bug where destroy of fragment calls
invalideMenu of Activity even though the fragment does
not participate in menu updates.

https://issuetracker.google.com/issues/244336571

Hence added an workaroud to not invalidate menu when
search is in progress.
@SajalRG SajalRG force-pushed the fix-search-bar-collapse branch from e0d9105 to edf487c Compare May 26, 2023 04:39
@SajalRG
Copy link
Contributor Author

SajalRG commented May 26, 2023

Hi @Bnyro , updated commit as per your suggestion. Please review. Thanks :)

@SajalRG SajalRG mentioned this pull request May 26, 2023
3 tasks
@Bnyro Bnyro merged commit 8192053 into libre-tube:master May 26, 2023
@SajalRG SajalRG deleted the fix-search-bar-collapse branch May 26, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search Text Controller Disposed When Playing/Dismissing A Video
3 participants