You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by da...@apache.org on 2016/06/16 11:13:43 UTC
cordova-windows git commit: CB-11443 Splashscreen is created the
second time on resume on Windows Only read the config and show the
splashscreen when necessary.
Repository: cordova-windows
Updated Branches:
refs/heads/master 04a290423 -> 04a0099dd
CB-11443 Splashscreen is created the second time on resume on Windows
Only read the config and show the splashscreen when necessary.
Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/04a0099d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/04a0099d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/04a0099d
Branch: refs/heads/master
Commit: 04a0099ddc10ce4e92baa7718ecd7ac8b0ee457d
Parents: 04a2904
Author: daserge <v-...@microsoft.com>
Authored: Thu Jun 16 00:32:11 2016 +0300
Committer: daserge <v-...@microsoft.com>
Committed: Thu Jun 16 12:33:58 2016 +0300
----------------------------------------------------------------------
cordova-js-src/platform.js | 10 +++++++---
template/www/cordova.js | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/04a0099d/cordova-js-src/platform.js
----------------------------------------------------------------------
diff --git a/cordova-js-src/platform.js b/cordova-js-src/platform.js
index d079f57..38de052 100644
--- a/cordova-js-src/platform.js
+++ b/cordova-js-src/platform.js
@@ -71,10 +71,14 @@ module.exports = {
});
}
+ if (e.detail.previousExecutionState === Windows.ApplicationModel.Activation.ApplicationExecutionState.running
+ || e.detail.previousExecutionState === Windows.ApplicationModel.Activation.ApplicationExecutionState.suspended) {
+ cordova.fireDocumentEvent('activated', platform.activationContext, true);
+ return;
+ }
+
e.setPromise(makePromise(configHelper.readConfig).then(function (config) {
- if (e.detail.previousExecutionState !== Windows.ApplicationModel.Activation.ApplicationExecutionState.running) {
- splashscreen.firstShow(config, e);
- }
+ splashscreen.firstShow(config, e);
}).then(function () {
// Avoids splashimage flicker on Windows Phone 8.1/10
return WinJS.Promise.timeout();
http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/04a0099d/template/www/cordova.js
----------------------------------------------------------------------
diff --git a/template/www/cordova.js b/template/www/cordova.js
index 3bd2584..7500c6a 100644
--- a/template/www/cordova.js
+++ b/template/www/cordova.js
@@ -1537,10 +1537,14 @@ module.exports = {
});
}
+ if (e.detail.previousExecutionState === Windows.ApplicationModel.Activation.ApplicationExecutionState.running
+ || e.detail.previousExecutionState === Windows.ApplicationModel.Activation.ApplicationExecutionState.suspended) {
+ cordova.fireDocumentEvent('activated', platform.activationContext, true);
+ return;
+ }
+
e.setPromise(makePromise(configHelper.readConfig).then(function (config) {
- if (e.detail.previousExecutionState !== Windows.ApplicationModel.Activation.ApplicationExecutionState.running) {
- splashscreen.firstShow(config, e);
- }
+ splashscreen.firstShow(config, e);
}).then(function () {
// Avoids splashimage flicker on Windows Phone 8.1/10
return WinJS.Promise.timeout();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org