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: Search was not working when closing a tab and immediately opening the search screen. #4199

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

MohitMaliFtechiz
Copy link
Collaborator

Fixes #4198

  • The issue occurred because, after closing a tab and quickly navigating to the search screen, the snackbar callback was still running in the background. When switching to the search screen, the WebView list was empty because we cleared it when the fragment's view was destroyed. As a result, the book was closed, and the SearchScreen could not find the ZIM file for searching.
  • To fix this, we now dismiss the snackbar callback when the fragment's view is destroyed.
screen-20250130-144708.mp4

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

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

Project coverage is 56.79%. Comparing base (553fc44) to head (8be4029).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../kiwix/kiwixmobile/core/main/CoreReaderFragment.kt 66.66% 2 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (66.66%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4199      +/-   ##
============================================
+ Coverage     56.71%   56.79%   +0.08%     
- Complexity     1530     1539       +9     
============================================
  Files           313      313              
  Lines         13510    13506       -4     
  Branches       1695     1694       -1     
============================================
+ Hits           7662     7671       +9     
+ Misses         4681     4669      -12     
+ Partials       1167     1166       -1     

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

…ing the search screen.

* The issue occurred because, after closing a tab and quickly navigating to the search screen, the snackbar callback was still running in the background. When switching to the search screen, the WebView list was empty because we clear it when the fragment's view is destroyed. As a result, the book was closed, and the SearchScreen could not find the ZIM file for searching.
* To fix this, we now dismiss the snackbar callback when the fragment's view is destroyed.
@kelson42 kelson42 merged commit 3da8c40 into main Jan 31, 2025
30 of 31 checks passed
@kelson42 kelson42 deleted the Fixes#4198 branch January 31, 2025 11:49
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 is not working when we close the tab and immediately open the search.
3 participants