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

Hide splash sceen without SplashScreenDelay on .hide() #1006

Merged
merged 1 commit into from
Oct 10, 2020

Conversation

BendingBender
Copy link
Contributor

@BendingBender BendingBender commented Oct 10, 2020

Fixes #991

Platforms affected

iOS

Motivation and Context

The cordova-plugin-splash-screen allowed to hide the splash screen as a race between the timeout specified in the SplashScreenDelay preference and the call to navigator.splashscreen.hide() in JS code. This was very desirable, it allowed to show the splash screen for a long time if the application took a long time to boot but not too long so that users wouldn't think that the application is hanging.

Since the reimplementation of this functionality here, the behavior has changed. Now, the SplashScreenDelay preference applies to calls made by navigator.splashscreen.hide(), defeating the behavior described above.

Description

Make hiding of splash screen again a race between the timeout specified in SplashScreenDelay setting and navigator.splashscreen.hide() call.

Testing

Manual tests in simulator and real device (iPhone X).

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change - no idea, how
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android)) - doesn't make sense, this is a cordova-ios repo, it can only be ios-related
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

Make hiding of splash screen a race between `SplashScreenDelay` setting
and navigator.splashscreen.hide().

Related issue: apache#991
@dpogue dpogue self-assigned this Oct 10, 2020
@dpogue
Copy link
Member

dpogue commented Oct 10, 2020

Thanks for the PR @BendingBender! 🎉

This looks good with a quick skim over it, I'll take a more thorough look tomorrow.

@codecov-io
Copy link

codecov-io commented Oct 10, 2020

Codecov Report

Merging #1006 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1006   +/-   ##
=======================================
  Coverage   74.91%   74.91%           
=======================================
  Files          13       13           
  Lines        1718     1718           
=======================================
  Hits         1287     1287           
  Misses        431      431           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d06c0a...1391b0b. Read the comment docs.

@dpogue dpogue merged commit cb20c9b into apache:master Oct 10, 2020
@dpogue dpogue added this to the 6.1.2 milestone Oct 10, 2020
@BendingBender BendingBender deleted the bugfix/hide-splash-screen-immediately branch October 10, 2020 21:15
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.

SplashScreenDelay should not apply when calling splashscreen.show() / splashscreen.hide()
3 participants