Don't show update button when there is no update
This commit is contained in:
parent
9de5c340c3
commit
78ea617a53
@ -336,6 +336,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
||||
}
|
||||
|
||||
$numberOfOutdated = $this->maniaControl->updateManager->getNumberOfOutdatedPlugins();
|
||||
if($numberOfOutdated > 0) {
|
||||
$updatePluginsButton = new Label_Button();
|
||||
$frame->add($updatePluginsButton);
|
||||
$updatePluginsButton->setHAlign(Control::RIGHT);
|
||||
@ -345,6 +346,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
||||
$updatePluginsButton->setStyle($updatePluginsButton::STYLE_CardButtonSmall);
|
||||
$updatePluginsButton->setText('Update '.$numberOfOutdated.' plugin(s)');
|
||||
$updatePluginsButton->setAction(self::ACTION_UPDATEPLUGINS);
|
||||
}
|
||||
|
||||
return $frame;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user