From dad819282a8fafea10295856f8f12fc198ecf11c Mon Sep 17 00:00:00 2001 From: evgeny Date: Mon, 19 Oct 2026 14:21:37 +0200 Subject: [PATCH] Expose live member availability to desktop action buttons --- tools/chatgui/src/memberlistmodel.cpp | 1 + tools/chatgui/src/memberlistmodel.h | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/chatgui/src/memberlistmodel.cpp b/tools/chatgui/src/memberlistmodel.cpp index 2c76e994..b4911aa6 100644 --- a/tools/chatgui/src/memberlistmodel.cpp +++ b/tools/chatgui/src/memberlistmodel.cpp @@ -79,6 +79,7 @@ QVariant MemberListModel::data(const QModelIndex& index, int role) const { if (role == Qt::UserRole + 3) return it->flags; if (role == Qt::UserRole + 4) return (bool)it->storage; if (role == RadioSpeakingRole) return it->isSelf ? m_selfTransmitting : m_radioTalkers.contains(it->nodeId); + if (role == OnlineRole) return it->online; return {}; } return {}; diff --git a/tools/chatgui/src/memberlistmodel.h b/tools/chatgui/src/memberlistmodel.h index a518da54..802a5f0c 100644 --- a/tools/chatgui/src/memberlistmodel.h +++ b/tools/chatgui/src/memberlistmodel.h @@ -32,6 +32,7 @@ public: static constexpr int kRowHeight = 36; static constexpr int kAvatarSize = kRowHeight - 2; static constexpr int RadioSpeakingRole = Qt::UserRole + 5; + static constexpr int OnlineRole = Qt::UserRole + 6; /* живой статус BGP для кнопок вызова */ explicit MemberListModel(QObject* parent = nullptr);