Commit d3e6490f authored by Dave Barker's avatar Dave Barker 🐈

Issue 7327 - Update showOptions calls to use Promises

parent 145d514d
...@@ -422,13 +422,12 @@ ...@@ -422,13 +422,12 @@
}; };
modules.options = { modules.options = {
showOptions(callback) showOptions()
{ {
if (!/\/(?:mobile|desktop)-options\.html\b/.test(top.location.href)) if (!/\/(?:mobile|desktop)-options\.html\b/.test(top.location.href))
window.open("desktop-options.html", "_blank"); window.open("desktop-options.html", "_blank");
if (callback) return Promise.resolve();
callback();
} }
}; };
......
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
{ {
if (message.what == "options") if (message.what == "options")
{ {
showOptions(() => showOptions().then(() =>
{ {
if (!message.action) if (!message.action)
return; return;
...@@ -496,7 +496,7 @@ ...@@ -496,7 +496,7 @@
if ("homepage" in message) if ("homepage" in message)
subscription.homepage = message.homepage; subscription.homepage = message.homepage;
showOptions(() => showOptions().then(() =>
{ {
sendMessage("app", "addSubscription", subscription); sendMessage("app", "addSubscription", subscription);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment