1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-23 13:33:50 +03:00

do not reload views for default indicators

--when default indicators are reinstalled then
views do not have to be reload its sources. The user
is expected in such cases to restart Latte. At the
same time installing Latte multiple times does not
create too many views recreations with no real
reason
This commit is contained in:
Michail Vourlakos 2020-04-15 12:50:36 +03:00
parent 92f1b1fe30
commit b296437288
3 changed files with 8 additions and 1 deletions

View File

@ -122,6 +122,11 @@ void Indicator::setEnabledForApplets(bool enabled)
emit enabledForAppletsChanged();
}
bool Indicator::isCustomIndicator() const
{
return m_corona->indicatorFactory()->isCustomType(type());
}
bool Indicator::latteTasksArePresent()
{
return m_view->latteTasksArePresent();

View File

@ -96,6 +96,8 @@ public:
bool enabledForApplets() const;
void setEnabledForApplets(bool enabled);
bool isCustomIndicator() const;
bool latteTasksArePresent();
bool providesConfigUi() const;

View File

@ -280,7 +280,7 @@ void View::init()
});
connect(this, &View::indicatorPluginChanged, this, [&](const QString &indicatorId) {
if (m_indicator && m_indicator->type() == indicatorId) {
if (m_indicator && m_indicator->isCustomIndicator() && m_indicator->type() == indicatorId) {
reloadSource();
}
});