Show silent, speaking and muted radio speakers in member rows
This commit is contained in:
1 parent
5cbab70035
commit
e61fc8e392
2 files changed
+26
-9
No files matched your search
@@ -4,6 +4,7 @@
|
||||
#include "messagelist.h"
|
||||
#include "messagedelegate.h"
|
||||
#include "accountlist.h"
|
||||
#include "memberlistmodel.h"
|
||||
#include "invitedialog.h"
|
||||
#include "dminvitedialog.h"
|
||||
#include "debug_ui.h"
|
||||
@@ -201,6 +202,7 @@ MainWindow::~MainWindow() {
|
||||
gui_bridge_set_member_list_cb(nullptr);
|
||||
gui_bridge_set_member_updated_cb(nullptr);
|
||||
gui_bridge_set_member_removed_cb(nullptr);
|
||||
gui_bridge_set_radio_talk_cb(nullptr);
|
||||
gui_bridge_set_my_node_id_cb(nullptr);
|
||||
gui_bridge_set_auto_connect_status_cb(nullptr);
|
||||
gui_bridge_set_channel_peers_online_cb(nullptr);
|
||||
@@ -530,6 +532,8 @@ void MainWindow::setupBridgeCallbacks() {
|
||||
|
||||
/* ── рация: индикация говорящего ── */
|
||||
gui_bridge_set_radio_talk_cb([](uint64_t group_id, uint64_t src_node_id, uint8_t on) {
|
||||
if (s_mainWindow && s_mainWindow->m_accountList)
|
||||
s_mainWindow->m_accountList->model()->onRadioTalk(group_id, src_node_id, on != 0);
|
||||
if (s_mainWindow && s_mainWindow->m_messageList)
|
||||
s_mainWindow->m_messageList->onRadioTalk((quint64)group_id, (quint64)src_node_id, on != 0);
|
||||
});
|
||||
@@ -546,6 +550,7 @@ void MainWindow::setupBridgeCallbacks() {
|
||||
gui_bridge_set_network_changed_cb([](int type) {
|
||||
if (!s_mainWindow) return;
|
||||
if (type == 13) {
|
||||
s_mainWindow->m_accountList->model()->setRadioState(0, false, false);
|
||||
s_mainWindow->m_messageList->clearDmCallRoute();
|
||||
s_mainWindow->m_channelList->clearDmPresence();
|
||||
} else {
|
||||
@@ -567,6 +572,10 @@ void MainWindow::setupBridgeCallbacks() {
|
||||
}
|
||||
|
||||
void MainWindow::setupConnects() {
|
||||
connect(RadioAudioEngine::instance(), &RadioAudioEngine::stateChanged, this, [this] {
|
||||
auto* engine = RadioAudioEngine::instance();
|
||||
m_accountList->model()->setRadioState(engine->groupId(), engine->isActive(), engine->isTransmitting());
|
||||
});
|
||||
connect(m_channelList, &ChannelList::channelSelected,
|
||||
this, [this](const QString& channelId) {
|
||||
saveLastChannelId(channelId);
|
||||
|
||||
Reference in new issue
Block a user