From 652536114521fce5e3f9806a7ef5dbcdfeaa4f25 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 3 Aug 2020 15:46:47 +0200 Subject: [PATCH] Do not set active app on an app with status 5 (run in background) for mobile framework --- pixelegg/js/fw_mobile.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pixelegg/js/fw_mobile.js b/pixelegg/js/fw_mobile.js index ad283fd7f0..06504b7fc1 100644 --- a/pixelegg/js/fw_mobile.js +++ b/pixelegg/js/fw_mobile.js @@ -588,8 +588,16 @@ // otherwise the first app in the list if (activeApp =="" || !activeApp) { + for(var i in this.applications) + { + if (restore[i]['status'] != 5) + { + activeApp = this.applications[i]; + break; + } + } this.setActiveApp(typeof this.applications.home !='undefined'? - this.applications.home:this.applications[Object.keys(this.applications)[0]]); + this.applications.home:activeApp); } //Set the current state of the tabs and activate TabChangeNotification.