Skip to content

Commit

Permalink
Chatroom: Fix tab activation
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansenDatabay committed Nov 2, 2023
1 parent 64cbde1 commit d3483ce
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Modules/Chatroom/classes/class.ilObjChatroomAdminGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ public function executeCommand(): void
{
$next_class = strtolower($this->ctrl->getNextClass());

$tabFactory = new ilChatroomTabGUIFactory($this);

switch ($next_class) {
case strtolower(ilPermissionGUI::class):
$tabFactory->getAdminTabsForCommand($this->ctrl->getCmd());
$this->prepareOutput();
$perm_gui = new ilPermissionGUI($this);
$this->ctrl->forwardCommand($perm_gui);
Expand All @@ -76,7 +79,6 @@ public function executeCommand(): void
break;

default:
$tabFactory = new ilChatroomTabGUIFactory($this);
$tabFactory->getAdminTabsForCommand($this->ctrl->getCmd());
$res = explode('-', $this->ctrl->getCmd(), 2);
if (!array_key_exists(1, $res)) {
Expand All @@ -85,6 +87,11 @@ public function executeCommand(): void

$this->dispatchCall($res[0], $res[1]);
}

if ($tabFactory->getActivatedTab() !== null &&
$this->tabs_gui->getActiveTab() !== $tabFactory->getActivatedTab()) {
$this->tabs_gui->activateTab($tabFactory->getActivatedTab());
}
}

public function getConnector(): ilChatroomServerConnector
Expand Down

0 comments on commit d3483ce

Please sign in to comment.