From 2b45a04911cf030df21384e0ab1026325141b7f2 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Wed, 5 May 2021 04:28:54 -0400 Subject: GetUserStatus returns offline instead of nullopt --- components/statusindicator.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'components/statusindicator.cpp') diff --git a/components/statusindicator.cpp b/components/statusindicator.cpp index f10d1ef..6e7e0fb 100644 --- a/components/statusindicator.cpp +++ b/components/statusindicator.cpp @@ -36,13 +36,8 @@ void StatusIndicator::CheckStatus() { get_style_context()->remove_class("dnd"); get_style_context()->remove_class("idle"); get_style_context()->remove_class("offline"); - if (status.has_value()) { - get_style_context()->add_class(GetPresenceString(*status)); - m_status = *status; - } else { - m_status = PresenceStatus::Offline; - get_style_context()->add_class("offline"); - } + get_style_context()->add_class(GetPresenceString(status)); + m_status = status; if (last_status != m_status) queue_draw(); -- cgit v1.2.3