mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 09:33:49 +02:00
Fix menu unsubscribing.
This commit is contained in:
parent
0622be55e6
commit
1f67adc6dd
1 changed files with 4 additions and 2 deletions
|
@ -109,6 +109,8 @@
|
|||
}
|
||||
|
||||
function onMenuItemEvent(menuItem) {
|
||||
var menuItemList = JSON.stringify(Settings.getValue("goToDecentral", ""));
|
||||
var menuItemExists = menuItemList.indexOf(menuItem) !== -1;
|
||||
if (menuItem == "Subscribe to new GoTo provider") {
|
||||
goToAddress = Settings.getValue("goToDecentral", "");
|
||||
var arrayLength = goToAddress.length;
|
||||
|
@ -116,9 +118,9 @@
|
|||
if (prom) {
|
||||
goToAddress[arrayLength] = prom;
|
||||
Settings.setValue("goToDecentral", goToAddress);
|
||||
Menu.addMenuItem("GoTo > Unsubscribe from GoTo provider", prom);
|
||||
Menu.addMenuItem("Explore > Unsubscribe from GoTo provider", prom);
|
||||
}
|
||||
} else {
|
||||
} else if (menuItemExists) {
|
||||
goToAddresses = Settings.getValue("goToDecentral", "");
|
||||
Menu.removeMenuItem("Explore > Unsubscribe from GoTo provider", menuItem);
|
||||
goToAddresses.remove(menuItem);
|
||||
|
|
Loading…
Reference in a new issue