MenuModule.reload(), updated @systemMethod:reloadMenu(), and notes
This commit is contained in:
parent
1f396e198e
commit
118cb97487
|
@ -187,6 +187,12 @@ exports.MenuModule = class MenuModule extends PluginModule {
|
|||
return this.client.menuStack.goto(name, options, cb);
|
||||
}
|
||||
|
||||
reload(cb) {
|
||||
const prevMenu = this.client.menuStack.pop();
|
||||
prevMenu.instance.leave();
|
||||
return this.client.menuStack.goto(prevMenu.name, cb);
|
||||
}
|
||||
|
||||
addViewController(name, vc) {
|
||||
assert(!this.viewControllers[name], `ViewController by the name of "${name}" already exists!`);
|
||||
|
||||
|
|
|
@ -87,11 +87,9 @@ function nextMenu(callingMenu, formData, extraArgs, cb) {
|
|||
});
|
||||
}
|
||||
|
||||
// :TODO: prev/nextConf, prev/nextArea should use a NYI MenuModule.redraw() or such -- avoid pop/goto() hack!
|
||||
// :TODO: need redrawMenu() and MenuModule.redraw()
|
||||
function reloadMenu(menu, cb) {
|
||||
const prevMenu = menu.client.menuStack.pop();
|
||||
prevMenu.instance.leave();
|
||||
menu.client.menuStack.goto(prevMenu.name, cb);
|
||||
return menu.reload(cb);
|
||||
}
|
||||
|
||||
function prevConf(callingMenu, formData, extraArgs, cb) {
|
||||
|
|
Loading…
Reference in New Issue