[feat] use unordered map to store recent connection info so that the most recent connections are shown at the front

This commit is contained in:
dijunkun
2025-07-15 17:34:25 +08:00
parent 75021b74ef
commit f650b5a6ef
3 changed files with 10 additions and 6 deletions

View File

@@ -15,6 +15,7 @@
#include <mutex>
#include <optional>
#include <string>
#include <unordered_map>
#include "IconsFontAwesome6.h"
#include "config_center.h"
@@ -269,7 +270,8 @@ class Render {
std::unique_ptr<Thumbnail> thumbnail_;
// recent connections
std::map<std::string, Thumbnail::RecentConnection> recent_connections_;
std::unordered_map<std::string, Thumbnail::RecentConnection>
recent_connections_;
int recent_connection_image_width_ = 160;
int recent_connection_image_height_ = 90;
uint32_t recent_connection_image_save_time_ = 0;