fix(ui-new): one '#' on a hashtag channel's favourite tile and slot list

Hashtag channel names already start with '#'; the tiles added another
("##test"). chanctl::bareName() is now the one place that strips it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-08 23:41:40 +02:00
co-authored by Claude Opus 5.5
parent 9ef7d5d981
commit 92e379e05c
3 changed files with 7 additions and 3 deletions
@@ -19,6 +19,10 @@ namespace chanctl {
enum Result : uint8_t { OK, FULL, NO_NAME, NO_SECRET, BAD_SECRET, EXISTS, FAILED };
// A channel's name without the '#' a hashtag channel's starts with -- for a
// label that puts its own '#' in front (as ui-new's tiles do), never "##test".
static inline const char* bareName(const char* name) { return name[0] == '#' ? name + 1 : name; }
static const char* resultText(Result r) {
switch (r) {
case OK: return "Saved";