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: issue with front page of Zim on a USB stick loading. #3817

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented May 2, 2024

Fixes #3809

  • Rectified the ServiceWorkerUninitialiser code to appropriately uninitialize the service worker. Previously, when the uninitializing code ran from the JavaScript interface, we directly called the function, which sometimes functioned correctly but sometimes did not. To address this inconsistency, we are now invoking that function to ensure the main page loads after the service worker is uninitialized.
  • Rectified the syntax error in the ServiceWorkerUninitialiser JavaScript code, which was causing an issue on API level 24. Consequently, the main page failed to load on this API level. We've refactored our code to ensure compatibility across all API levels.
  • Now that our service is functioning correctly, there's no need to explicitly load the main page. Upon service worker uninitialization, the main page automatically loads.

Screenshot from 2024-05-06 19-56-42

Copy link

codecov bot commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.33%. Comparing base (11e5bb3) to head (4b8dd0e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3817      +/-   ##
============================================
+ Coverage     53.14%   53.33%   +0.19%     
- Complexity     1306     1319      +13     
============================================
  Files           292      292              
  Lines         11062    11060       -2     
  Branches       1471     1471              
============================================
+ Hits           5879     5899      +20     
+ Misses         4202     4190      -12     
+ Partials        981      971      -10     

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

@kelson42
Copy link
Collaborator

kelson42 commented May 3, 2024

@MohitMaliDeveloper Is this PR still a draft?

* Rectified the `ServiceWorkerUninitialiser` code to appropriately uninitialize the service worker. Previously, when the uninitializing code ran from the JavaScript interface, we directly called the function, which sometimes functioned correctly but sometimes did not. To address this inconsistency, we are now invoking that function to ensure the main page loads after the service worker is uninitialized.
* Rectified the syntax error in the `ServiceWorkerUninitialiser` JavaScript code, which was causing an issue on API level 24. Consequently, the main page failed to load on this API level. We've refactored our code to ensure compatibility across all API levels.
* Now that our service is functioning correctly, there's no need to explicitly load the main page. Upon service worker uninitialization, the main page automatically loads.
@MohitMaliFtechiz
Copy link
Collaborator Author

@kelson42 This PR is now ready for review.

@kelson42 kelson42 merged commit c29abd1 into main May 6, 2024
10 checks passed
@kelson42 kelson42 deleted the Fix#3809 branch May 6, 2024 18:19
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.

issue with front page of Zim on a USB stick loading
3 participants