fix(runtime): stabilize storage and radio arbitration

This commit is contained in:
liu weikai
2026-07-21 08:02:13 +08:00
parent a7c1086be2
commit 4e291eed5b
30 changed files with 666 additions and 355 deletions
@@ -593,6 +593,20 @@ void refresh_contacts_data_impl_internal()
filter_to_active_protocol(g_contacts_state.nearby_list);
filter_to_active_protocol(g_contacts_state.ignored_list);
merge_reticulum_directory_projection();
const chat::MeshProtocol active_protocol =
chat::infra::normalizeMeshProtocol(
app::configFacade().getConfig().mesh_protocol);
if (chat::infra::isReticulumMeshProtocol(active_protocol))
{
std::stable_sort(
g_contacts_state.nearby_list.begin(),
g_contacts_state.nearby_list.end(),
[](const chat::contacts::NodeInfo& lhs,
const chat::contacts::NodeInfo& rhs)
{
return lhs.last_seen > rhs.last_seen;
});
}
mark_contacts_data_refreshed();
CONTACTS_LOG("[Contacts] Data refreshed: %zu contacts, %zu nearby, %zu groups, %zu ignored\n",
@@ -3262,7 +3262,6 @@ static void on_option_clicked(lv_event_t* e)
{
rebuild_list = true;
::ui::feedback::show_notice(::ui::i18n::tr("Protocol switched"), 2000);
restart_now = true;
}
}
if (id == settings::ui::SettingId::ChatRegion)