From 5e57dd4713be433c1268d29b70bf9c8858c2b825 Mon Sep 17 00:00:00 2001 From: Absobel Date: Wed, 2 Aug 2023 01:19:19 +0900 Subject: [PATCH] minor --- src/modules/network.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/network.cpp b/src/modules/network.cpp index 3791f018..ef59c95c 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -130,13 +130,13 @@ waybar::modules::Network::Network(const std::string &id, const Json::Value &conf } } - createEventSocket(); - createInfoSocket(); - if (!ping_servers_.empty()) { startPingCheckThread(); } + createEventSocket(); + createInfoSocket(); + dp.emit(); // Ask for a dump of interfaces and then addresses to populate our // information. First the interface dump, and once done, the callback @@ -299,7 +299,7 @@ const std::string waybar::modules::Network::getNetworkState() const { if (!carrier_) return "disconnected"; if (ipaddr_.empty()) return "linked"; if (essid_.empty() && has_internet_access_) return "ethernet"; - else if (essid_.empty() && !has_internet_access_) return "ethernet-no-internet"; + if (essid_.empty() && !has_internet_access_) return "ethernet-no-internet"; if (!has_internet_access_) return "wifi-no-internet"; return "wifi"; }