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

Fixed: When devices went to sleep mode, the search filter was reset of the online library. #4220

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Feb 11, 2025

Fixes #4205

  • Preserved search query across lifecycle changes to restore it when the fragment becomes visible again.
  • Previously, when the device went to sleep, viewLifecycleOwner closed the search view due to lifecycle events, resetting the search.
  • Now, the query is stored in ViewModel (which is lifecycle-aware) and restored when the online library screen is reopened.
  • Search is reset only when the user explicitly clears it.
  • Added OnlineLibraryFragmentTest instrumentation (UI) test case to test this new functionality.
screen-20250211-155956.mp4

…f the online library.

* Preserved search query across lifecycle changes to restore it when the fragment becomes visible again.
* Previously, when the device went to sleep, `viewLifecycleOwner` closed the search view due to lifecycle events, resetting the search.
* Now, the query is stored in `ViewModel` (which is lifecycle-aware) and restored when the online library screen is reopened.
* Search is reset only when the user explicitly clears it.
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 57.61%. Comparing base (a88884a) to head (cd67d40).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...e/nav/destination/library/OnlineLibraryFragment.kt 84.21% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4220      +/-   ##
============================================
+ Coverage     57.18%   57.61%   +0.43%     
- Complexity     1584     1590       +6     
============================================
  Files           316      316              
  Lines         13746    13765      +19     
  Branches       1722     1726       +4     
============================================
+ Hits           7860     7931      +71     
+ Misses         4692     4648      -44     
+ Partials       1194     1186       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft February 11, 2025 11:10
@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as ready for review February 11, 2025 13:14
@kelson42 kelson42 merged commit e1eafa1 into main Feb 13, 2025
31 checks passed
@kelson42 kelson42 deleted the Fixes#4205 branch February 13, 2025 09:25
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.

Free text filter of online library should persist
3 participants