When amazon music app(
3201710014874) is shown in FG, and press
preview in amazon music, page is not reload, bcz WRT think request
src is the same with original url.
request src is "file:///index.html#!/deepLink",
original url is "file:///index.html#!/main/home".
Actually they are different, WRT should reload it.
Change-Id: I7f7b5767c1a34b017f80d6babe8e58f760f967a1
Signed-off-by: liwei <wei90727.li@samsung.com>
let reload = loadInfo.getReload() || _this.webApplication.isAlwaysReload;
if (!reload) {
let reload = loadInfo.getReload() || _this.webApplication.isAlwaysReload;
if (!reload) {
+ let originalUrl = _this.webApplication.mainWindow.getURL();
- console.log(`src = ${src}, app-control uri = ${_this.webApplication.mainWindow.getURL()}`);
- const url = require('url');
- let appcontrolUrl = url.parse(src);
- let originUrl = url.parse(_this.webApplication.mainWindow.getURL());
- if (appcontrolUrl.protocol !== originUrl.protocol ||
- appcontrolUrl.host !== originUrl.host ||
- appcontrolUrl.pathname !== originUrl.pathname) {
- reload = true;
- }
- } else {
- if (src != _this.webApplication.mainWindow.getURL()) {
+ console.log(`appcontrol src = ${src}, original url = ${originalUrl}`);
+ if (src && originalUrl) {
+ let appcontrolUrl = new URL(src);
+ let oldUrl = new URL(originalUrl);
+ if ('file:' !== appcontrolUrl.protocol &&
+ (appcontrolUrl.protocol !== oldUrl.protocol ||
+ appcontrolUrl.host !== oldUrl.host ||
+ appcontrolUrl.pathname !== oldUrl.pathname)) {
+ reload = true;
+ } else if ('file:' === appcontrolUrl.protocol && (src !== originalUrl)) {
+ reload = true;
+ }
+ } else if (src !== originalUrl) {
+ } else if (src !== originalUrl) {
+ reload = true;
}
}
// handle http://tizen.org/appcontrol/operation/main operation specially.
}
}
// handle http://tizen.org/appcontrol/operation/main operation specially.