mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-08-28 23:00:19 +00:00
fix(runtime): stabilize storage and radio arbitration
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user