Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[lipstick] Update notification configuration. JB#39340
Set summary/body instead of previewSummary/previewBody.
Set transient where necessary.
  • Loading branch information
Bea Lam committed Jul 23, 2020
1 parent 552e8db commit d45dd73
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/notificationcategories/x-nemo.battery.temperature.conf
@@ -1,4 +1,4 @@
app_icon=icon-system-warning
urgency=2
expireTimeout=60000
transient=true
x-nemo-feedback=general_warning
3 changes: 1 addition & 2 deletions src/notifications/batterynotifier.cpp
Expand Up @@ -458,15 +458,14 @@ void BatteryNotifier::sendNotification(BatteryNotifier::NotificationType type)
/* Add fresh notification item */
QVariantHash hints;
hints.insert(LipstickNotification::HINT_CATEGORY, info.category);
hints.insert(LipstickNotification::HINT_PREVIEW_BODY, message);
hints.insert(LipstickNotification::HINT_VISIBILITY, QLatin1String("public"));
QueuedNotification queuedNotification;
queuedNotification.m_type = type;
queuedNotification.m_id = m_notificationManager->Notify(m_notificationManager->systemApplicationName(),
0,
info.icon,
QString(),
QString(),
message,
QStringList(),
hints,
-1);
Expand Down
10 changes: 8 additions & 2 deletions src/notifications/thermalnotifier.cpp
Expand Up @@ -66,6 +66,12 @@ void ThermalNotifier::createAndPublishNotification(const QString &category, cons
NotificationManager *manager = NotificationManager::instance();
QVariantHash hints;
hints.insert(LipstickNotification::HINT_CATEGORY, category);
hints.insert(LipstickNotification::HINT_PREVIEW_BODY, body);
manager->Notify(manager->systemApplicationName(), 0, QString(), QString(), QString(), QStringList(), hints, -1);
manager->Notify(manager->systemApplicationName(),
0,
QString(),
QString(),
body,
QStringList(),
hints,
-1);
}
3 changes: 1 addition & 2 deletions src/shutdownscreen.cpp
Expand Up @@ -122,8 +122,7 @@ void ShutdownScreen::createAndPublishNotification(const QString &category, const
NotificationManager *manager = NotificationManager::instance();
QVariantHash hints;
hints.insert(LipstickNotification::HINT_CATEGORY, category);
hints.insert(LipstickNotification::HINT_PREVIEW_BODY, body);
manager->Notify(manager->systemApplicationName(), 0, QString(), QString(), QString(), QStringList(), hints, -1);
manager->Notify(manager->systemApplicationName(), 0, QString(), QString(), body, QStringList(), hints, -1);
}

void ShutdownScreen::setShutdownMode(const QString &mode)
Expand Down

0 comments on commit d45dd73

Please sign in to comment.