      qDebug() << "JSON Parse failed on navigation locations";
      return;
    }
  
    clear();
  
    bool has_recents = false;
    for (auto &save_type: {"favorite", "recent"}) {
      for (auto location : doc.array()) {
 
</s> remove   stack->setCurrentIndex((uiState()->prime_type || success) ? 0 : 1);
 </s> add   if (!success) return; </s> remove   if (!success) {
    return;
 </s> add   cur_destinations = response;
  if (isVisible()) {
    refresh(); </s> remove   QJsonDocument doc = QJsonDocument::fromJson(response.trimmed().toUtf8());
 </s> add   QJsonDocument doc = QJsonDocument::fromJson(cur_destinations.trimmed().toUtf8());
  prev_destinations = cur_destinations;
      qDebug() << "JSON Parse failed on navigation locations";
      return;
    }
  
  prev_destinations = cur_destinations;
    clear();
  
    bool has_recents = false;
    for (auto &save_type: {"favorite", "recent"}) {
      for (auto location : doc.array()) {
keep keep keep add keep keep keep keep keep
 MapPanel: refresh only when visible and destination changes (#25739)

rebuild widgets only when mappanel is visible 
selfdrive/ui/qt/maps/map_settings.cc