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:
parent
92f1b1fe30
commit
b296437288
@ -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();
|
||||
|
@ -96,6 +96,8 @@ public:
|
||||
bool enabledForApplets() const;
|
||||
void setEnabledForApplets(bool enabled);
|
||||
|
||||
bool isCustomIndicator() const;
|
||||
|
||||
bool latteTasksArePresent();
|
||||
bool providesConfigUi() const;
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user