|
1 |
| -var setupExtendedSplashScreen, updateSplashScreenPositioning, |
| 1 | +var setupExtendedSplashScreen, updateSplashScreenPositioning, |
2 | 2 | splashScreen, splashScreenEl, splashScreenImageEl,
|
3 |
| - isWindows = navigator.appVersion.indexOf("Windows Phone 8.1") === -1; |
| 3 | + isWindows = navigator.appVersion.indexOf("Windows Phone") === -1, |
| 4 | + isWindowsPhone10 = navigator.appVersion.indexOf("Windows Phone 10") !== -1; |
4 | 5 |
|
5 |
| -WinJS.Application.addEventListener("activated", function (e) { |
6 |
| - if (e.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { |
7 |
| - splashScreen = e.detail.splashScreen; |
| 6 | +// TODO: Need to fix styling issues whith the extended splash screen for Windows Phone 10 (disabled for now) |
| 7 | +if (!isWindowsPhone10) { |
| 8 | + WinJS.Application.addEventListener("activated", function (e) { |
| 9 | + if (e.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { |
| 10 | + splashScreen = e.detail.splashScreen; |
8 | 11 |
|
9 |
| - // Listen for window resize events to reposition the extended splash screen image accordingly. |
10 |
| - // This is important to ensure that the extended splash screen is formatted properly in response to snapping, unsnapping, rotation, etc... |
11 |
| - window.addEventListener("resize", updateSplashPositioning, false); |
| 12 | + // Listen for window resize events to reposition the extended splash screen image accordingly. |
| 13 | + // This is important to ensure that the extended splash screen is formatted properly in response to snapping, unsnapping, rotation, etc... |
| 14 | + window.addEventListener("resize", updateSplashPositioning, false); |
12 | 15 |
|
13 |
| - var previousExecutionState = e.detail.previousExecutionState; |
14 |
| - var state = Windows.ApplicationModel.Activation.ApplicationExecutionState; |
15 |
| - if (previousExecutionState === state.notRunning |
16 |
| - || previousExecutionState === state.terminated |
17 |
| - || previousExecutionState === state.closedByUser) { |
18 |
| - setupExtendedSplashScreen(); |
| 16 | + var previousExecutionState = e.detail.previousExecutionState; |
| 17 | + var state = Windows.ApplicationModel.Activation.ApplicationExecutionState; |
| 18 | + if (previousExecutionState === state.notRunning |
| 19 | + || previousExecutionState === state.terminated |
| 20 | + || previousExecutionState === state.closedByUser) { |
| 21 | + setupExtendedSplashScreen(); |
| 22 | + } |
19 | 23 | }
|
20 |
| - } |
21 |
| -}, false); |
| 24 | + }, false); |
| 25 | +} |
22 | 26 |
|
23 | 27 | setupExtendedSplashScreen = function () {
|
24 | 28 | splashScreenEl = document.getElementById("extendedSplashScreen");
|
|
0 commit comments