  }
  
  void Sidebar::update(const UIState &s){
    static std::map<NetStatus, std::pair<QString, QColor>> connectivity_map = {
      {NET_ERROR, {"CONNECT\nERROR", COLOR_DANGER}},
      {NET_CONNECTED, {"CONNECT\nONLINE", COLOR_GOOD}},
      {NET_DISCONNECTED, {"CONNECT\nOFFLINE", COLOR_WARNING}},
    };
    auto net_params = connectivity_map[s.scene.athenaStatus];
    connect->update(net_params.first, "", net_params.second);
  
    static std::map<cereal::DeviceState::ThermalStatus, QColor> temp_severity_map = {
 
</s> remove void Sidebar::update(const UIState &s){
 </s> add void Sidebar::update(const UIState &s) { </s> remove   connect->update(net_params.first, "", net_params.second);
 </s> add   connect->update(net_params.first, net_params.second); </s> remove   panda->update(panda_message, "", panda_color);
 </s> add   panda->update(panda_message, panda_color); </s> remove   connect = new StatusWidget("CONNECT\nOFFLINE", "",  QColor(218, 202, 37), this);
 </s> add   connect = new StatusWidget(false, this);
      {NET_ERROR, {"CONNECT\nERROR", COLOR_DANGER}},
      {NET_CONNECTED, {"CONNECT\nONLINE", COLOR_GOOD}},
      {NET_DISCONNECTED, {"CONNECT\nOFFLINE", COLOR_WARNING}},
  }
  
  void Sidebar::update(const UIState &s){
    static std::map<NetStatus, std::pair<QString, QColor>> connectivity_map = {
      {NET_ERROR, {"CONNECT\nERROR", COLOR_DANGER}},
      {NET_CONNECTED, {"CONNECT\nONLINE", COLOR_GOOD}},
      {NET_DISCONNECTED, {"CONNECT\nOFFLINE", COLOR_WARNING}},
      {NET_ERROR, {"CONNECT\nERROR", COLOR_DANGER}},
      {NET_CONNECTED, {"CONNECT\nONLINE", COLOR_GOOD}},
      {NET_DISCONNECTED, {"CONNECT\nOFFLINE", COLOR_WARNING}},
      {NET_ERROR, {"CONNECT\nERROR", COLOR_DANGER}},
      {NET_CONNECTED, {"CONNECT\nONLINE", COLOR_GOOD}},
      {NET_DISCONNECTED, {"CONNECT\nOFFLINE", COLOR_WARNING}},
    };
    auto net_params = connectivity_map[s.scene.athenaStatus];
    connect->update(net_params.first, "", net_params.second);
  
    static std::map<cereal::DeviceState::ThermalStatus, QColor> temp_severity_map = {
keep keep keep keep replace replace replace keep keep keep keep keep
 Sidebar: update text and color in one place (#20777)

* do not set text&color in ctor

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> 
selfdrive/ui/qt/sidebar.cc