ModuleService: Activate modules in changeDisplayState(true) first
This commit is contained in:
@@ -183,6 +183,13 @@ public class ModuleServiceImpl implements ModuleService, ApplicationListener<Con
|
||||
if (module instanceof final AbstractClientModule clientModule && clientModule.isAlwaysDisplay()) {
|
||||
this.changeDisplayState(clientModule.getId(), true);
|
||||
}
|
||||
this.doActivateModule(id, module);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void doActivateModule(final String id, final AbstractModule module) {
|
||||
this.modulesActive.add(module);
|
||||
this.sortModules(this.modulesActive);
|
||||
synchronized (this.modulesActive) {
|
||||
@@ -204,9 +211,6 @@ public class ModuleServiceImpl implements ModuleService, ApplicationListener<Con
|
||||
|
||||
LOGGER.info("Activated {}", id);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deactivateAll() {
|
||||
@@ -225,6 +229,10 @@ public class ModuleServiceImpl implements ModuleService, ApplicationListener<Con
|
||||
|
||||
final boolean doDisplay = display || clientModule.isAlwaysDisplay();
|
||||
if (doDisplay && !curDisplayed) {
|
||||
if (this.modulesActiveView.stream().noneMatch(mod -> mod.getId().equals(id))) {
|
||||
this.doActivateModule(id, clientModule);
|
||||
}
|
||||
|
||||
this.modulesDisplayed.add(clientModule);
|
||||
clientModule.setDisplayed(true);
|
||||
LOGGER.info("Displayed {}", id);
|
||||
|
||||
Reference in New Issue
Block a user