feat(channels): Channel order setting - slots, newest message or name (#48)

Shared chanctl::order() builds the channel list for ui-new and the L2:
favourites first, then by ch_sort. New ch_sort pref at the end of NodePrefs,
Settings > Contacts row and contacts.channel.order CLI key.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-14 10:46:20 +02:00
co-authored by Claude Sonnet 5.5
parent 140ea7c008
commit 24dd025086
6 changed files with 75 additions and 29 deletions
+5
View File
@@ -535,6 +535,11 @@ struct NodePrefs { // persisted to file
// ui-new: 0 = big clock + date + unread pill, 1 = compact clock with the
// clock fields as rows below. The L2 has its own lock screen.
uint8_t lock_compact;
// Settings > Contacts > "Channel order": how the channel lists are sorted
// (after favourites, when those go first): 0 = as the slots are (default),
// 1 = latest message first, 2 = by name. See chanctl::order().
static const uint8_t CH_SORT_COUNT = 3;
uint8_t ch_sort;
// Single source of truth for the live-share option tables (shared by the Map
// UI labels and the auto-send engine in UITask).