- Clear plugin headers / pages on device change - Safety check existence of plugin on device change - Add plugin eventing capability
- Clear plugin headers / pages on device change - Safety check existence of plugin on device change - Add plugin eventing capability
Ryan Blenis committed
Dec 15, 2019 at 05:20 UTC
131ed2791372b0b9b867a46fdce5a2396ae83436
1 file changed
+7
-1
views/default.handlebars
+7
-1
@@ -2371,6 +2371,11 @@
2371
pluginHandler.refreshPluginHandler();
2372
break;
2373
}
2374
+ case 'plugin': {
2375
+ if (pluginHandler == null) break;
2376
+ try { pluginHandler[message.event.plugin][message.event.pluginaction](message); } catch (e) { console.log("PluginHandler could not event message: ", e); }
2377
+ break;
2378
+ }
2379
default:
2380
//console.log('Unknown message.event.action', message.event.action);
2381
break;
@@ -4610,9 +4615,10 @@
4615
4616
// Device refresh plugin handler
4617
if (pluginHandler != null) {
4618
+ QH('p19headers', ''); QH('p19pages', '');
4619
pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event);
4620
var lastTab = getstore('_curPluginPage', null);
4615
- if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab));
4621
+ if (lastTab != null && Q('p19ph-' + lastTab) != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab));
4622
}
4623
}
4624
setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching.