Console: Make NavHelper non-static

add NavService interface
hang off ClientAppManager
i2psnark: register additional instances with NavService
This commit is contained in:
zzz
2022-10-19 15:33:53 -04:00
parent f83f467b28
commit 0224a0f03b
9 changed files with 116 additions and 19 deletions
@@ -434,7 +434,7 @@ public class PluginStarter implements Runnable {
if(fullprop != null && fullprop.length() > 1){
byte[] decoded = Base64.decode(fullprop);
if(decoded != null) {
NavHelper.setBinary(appName, decoded);
NavHelper.getInstance(ctx).setBinary(appName, decoded);
iconfile = "/Plugins/pluginicon?plugin=" + appName;
} else {
iconfile = "/themes/console/images/plugin.png";
@@ -546,7 +546,7 @@ public class PluginStarter implements Runnable {
String tip = stripHTML(props, "consoleLinkTooltip_" + Messages.getLanguage(ctx));
if (tip == null)
tip = stripHTML(props, "consoleLinkTooltip");
NavHelper.registerApp(appName, name, url, tip, iconfile);
NavHelper.getInstance(ctx).registerApp(appName, name, url, tip, iconfile);
}
return true;
@@ -627,7 +627,7 @@ public class PluginStarter implements Runnable {
//}
// remove summary bar link
NavHelper.unregisterApp(appName);
NavHelper.getInstance(ctx).unregisterApp(appName);
return true;
}