Display the last connection time in dashboard/wivrnctl

This commit is contained in:
Guillaume Meunier
2025-03-25 21:15:01 +01:00
parent e0a1598ac5
commit 57a0cf1d4b
10 changed files with 252 additions and 57 deletions
+7 -2
View File
@@ -348,10 +348,15 @@ void wivrn_server::on_server_properties_changed(const QString & interface_name,
keys.beginStructure();
QString public_key;
QString name;
keys >> name >> public_key;
qlonglong last_connection_timestamp;
keys >> name >> public_key >> last_connection_timestamp;
keys.endStructure();
m_knownKeys.push_back(headset{name, public_key});
headset h{name, public_key};
if (last_connection_timestamp)
h.setLastConnection(QDateTime::fromSecsSinceEpoch(last_connection_timestamp));
m_knownKeys.push_back(h);
}
keys.endArray();