Keep publisher shortcut available in every desktop group
This commit is contained in:
1 parent
5b6ed6ee78
commit
c4da659dcb
3 files changed
+10
-4
No files matched your search
@@ -538,11 +538,12 @@ MessageList::MessageList(DbManager* db, AudioRecorder* recorder, QWidget *parent
|
||||
m_streamPublishBtn->setToolTip(QCoreApplication::translate("ChatGui", "Manage stream"));
|
||||
m_streamPublishBtn->setAccessibleName(m_streamPublishBtn->toolTip());
|
||||
connect(m_streamPublishBtn, &QPushButton::clicked, this, [this] {
|
||||
if (!m_streamPublisherGroup || m_currentChannelId.toULongLong() != m_streamPublisherGroup) {
|
||||
if (!m_streamPublisherGroup) {
|
||||
DEBUG_WARN(DEBUG_CATEGORY_STREAM, "desktop own stream action stale channel=%s publisher_group=%llx",
|
||||
qPrintable(m_currentChannelId), (unsigned long long)m_streamPublisherGroup); return;
|
||||
}
|
||||
DEBUG_INFO(DEBUG_CATEGORY_STREAM, "desktop own stream header clicked group=%llx", (unsigned long long)m_streamPublisherGroup);
|
||||
DEBUG_INFO(DEBUG_CATEGORY_STREAM, "desktop own stream header clicked channel=%s publisher_group=%llx",
|
||||
qPrintable(m_currentChannelId), (unsigned long long)m_streamPublisherGroup);
|
||||
emit streamPublishRequested(m_streamPublisherGroup);
|
||||
});
|
||||
hl->addWidget(m_streamPublishBtn);
|
||||
@@ -1594,7 +1595,7 @@ void MessageList::clearStreams() {
|
||||
/* Кнопка следует за локальным publisher, а не за запаздывающим/недоступным сетевым каталогом. */
|
||||
void MessageList::setStreamPublisherGroup(quint64 group) {
|
||||
m_streamPublisherGroup = group;
|
||||
const bool visible = group && group == m_currentChannelId.toULongLong();
|
||||
const bool visible = group && m_currentChannelId.toULongLong() != 0;
|
||||
if (visible == !m_streamPublishBtn->isHidden()) return;
|
||||
m_streamPublishBtn->setVisible(visible);
|
||||
DEBUG_INFO(DEBUG_CATEGORY_STREAM, "desktop own stream header channel=%s publisher_group=%llx visible=%d",
|
||||
|
||||
Reference in new issue
Block a user