Expose explicit desktop radio activation for accepted invitations
This commit is contained in:
1 parent
858ba38caf
commit
427794fed8
2 files changed
+10
No files matched your search
@@ -1599,6 +1599,15 @@ void MessageList::onStreamSources(const uint8_t* data, int len) {
|
|||||||
DEBUG_INFO(DEBUG_CATEGORY_STREAM, "desktop stream header group=%llx sources=%d", (unsigned long long)group, (int)m_streamSources.size());
|
DEBUG_INFO(DEBUG_CATEGORY_STREAM, "desktop stream header group=%llx sources=%d", (unsigned long long)group, (int)m_streamSources.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MessageList::enableRadio() {
|
||||||
|
if (m_currentChannelId.isEmpty() || isDmChannel(m_currentChannelId)) return false;
|
||||||
|
if (!m_radioOn) onRadioToggled(true);
|
||||||
|
QSignalBlocker blocker(m_radioBtn);
|
||||||
|
m_radioBtn->setChecked(m_radioOn);
|
||||||
|
return m_radioOn && RadioAudioEngine::instance()->isActive()
|
||||||
|
&& RadioAudioEngine::instance()->groupId() == m_currentChannelId.toULongLong();
|
||||||
|
}
|
||||||
|
|
||||||
void MessageList::onRadioToggled(bool on) {
|
void MessageList::onRadioToggled(bool on) {
|
||||||
if (m_currentChannelId.isEmpty() || isDmChannel(m_currentChannelId)) return;
|
if (m_currentChannelId.isEmpty() || isDmChannel(m_currentChannelId)) return;
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public:
|
|||||||
void onMessageSubmitted(const uint8_t* data, int len);
|
void onMessageSubmitted(const uint8_t* data, int len);
|
||||||
void onAttachmentKeysChanged(const uint8_t* data, int len);
|
void onAttachmentKeysChanged(const uint8_t* data, int len);
|
||||||
void onRadioTalk(quint64 groupId, quint64 srcNodeId, bool on); /* индикация говорящего */
|
void onRadioTalk(quint64 groupId, quint64 srcNodeId, bool on); /* индикация говорящего */
|
||||||
|
bool enableRadio(); /* идемпотентное включение рации выбранного канала, false при ошибке аудио */
|
||||||
void onStreamSources(const uint8_t* data, int len);
|
void onStreamSources(const uint8_t* data, int len);
|
||||||
void clearStreams();
|
void clearStreams();
|
||||||
void watchStreams();
|
void watchStreams();
|
||||||
|
|||||||
Reference in new issue
Block a user