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: latency in showing whether a bookmark is added in the toggle button. #3918

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Jul 1, 2024

Fixes #3912

  • Reproduced on a low-end device that is very slow.
  • Previously, we are checking the bookmark is added or not when a page is fully loaded in the webView. In the meantime previously set bookmark toggle is showing e.g. if the previous page is added as a bookmark then until the page is fully loaded the toggle is showing that the current is added as a bookmark. However, this new page is not added as a bookmark.
  • To fix this latency, we moved our updateUrlProcessor() method to the webViewProgressChanged method to update the bookmark toggle when a page starts loading in the webView. This fixes the latency in updating the bookmark toggle.
Before fix After fix
BeforeFixBookmarkToggle.mp4
AfterFixBookmarkToggle.mp4

…utton.

* Previously, we are checking the bookmark is added or not when a page is fully loaded in the webView. In the meantime previously set bookmark toggle is showing e.g. if the previous page is added as a bookmark then until the page is fully loaded the toggle is showing that the current is added as a bookmark. However, this new page is not added as a bookmark.
* To fix this latency, we moved our `updateUrlProcessor()` method to the `webViewProgressChanged` method to update the bookmark toggle when a page starts loading in the webView. This fixes the latency in updating the bookmark toggle.
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.60%. Comparing base (ad9e7e6) to head (5f9ef86).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3918      +/-   ##
============================================
+ Coverage     53.59%   53.60%   +0.01%     
  Complexity     1404     1404              
============================================
  Files           302      302              
  Lines         11615    11616       +1     
  Branches       1531     1531              
============================================
+ Hits           6225     6227       +2     
  Misses         4389     4389              
+ Partials       1001     1000       -1     

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

@MohitMaliFtechiz MohitMaliFtechiz requested a review from kelson42 July 1, 2024 13:27
@kelson42 kelson42 merged commit 3c0397d into main Jul 1, 2024
10 checks passed
@kelson42 kelson42 deleted the Fixes#3912 branch July 1, 2024 20:04
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.

Opening an article will show that it has been added as a bookmark
3 participants