summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Notification.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGUI/Notification.cpp')
-rw-r--r--Userland/Libraries/LibGUI/Notification.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/Notification.cpp b/Userland/Libraries/LibGUI/Notification.cpp
index 51667d6a97..34e06345c9 100644
--- a/Userland/Libraries/LibGUI/Notification.cpp
+++ b/Userland/Libraries/LibGUI/Notification.cpp
@@ -49,6 +49,7 @@ private:
};
Notification::Notification()
+ : m_connection(NotificationServerConnection::construct())
{
}
@@ -58,9 +59,8 @@ Notification::~Notification()
void Notification::show()
{
- auto connection = NotificationServerConnection::construct();
auto icon = m_icon ? m_icon->to_shareable_bitmap() : Gfx::ShareableBitmap();
- connection->send_sync<Messages::NotificationServer::ShowNotification>(m_text, m_title, icon);
+ m_connection->send_sync<Messages::NotificationServer::ShowNotification>(m_text, m_title, icon);
}
}