call: P2P аудиозвонки — сигналинг, релей медиа, аудио-контур, headless/desktop/android
- src/call/: сигналинг (call.c, call_proto.h, ETCP_RT_ID_CALL 0x36) + релей медиа + headless аудио-сокет (call_headless.c, call_audio_bind) + Opus/jitter/тоны - chat: события CHAT_EVT_CALL_* (34–40), CHAT_EVT_DM_MESSAGES (41), DM-трамплины - chatgui: call window, miniaudio I/O, audio_frame_ring, test_audio_jitter - chatgui-android: CallScreen/IncomingCallDialog, аудио-роутинг, JNI, рингтон - tests: test_call, test_call_headless
This commit is contained in:
1 parent
0157f7f96b
commit
b11e77e4c0
78 files changed
+7053
-70
No files matched your search
@@ -28,6 +28,7 @@ protected:
|
||||
void mousePressEvent(QMouseEvent* e) override {
|
||||
QModelIndex idx = indexAt(e->pos());
|
||||
if (!idx.isValid()) return;
|
||||
if (idx.data(ChannelIsSectionRole).toBool()) return;
|
||||
QRect gearRect = ChannelDelegate::settingsButtonRect(visualRect(idx));
|
||||
if (gearRect.contains(e->pos())) {
|
||||
emit settingsClicked(idx.data(ChannelChannelIdRole).toString());
|
||||
@@ -53,7 +54,7 @@ protected:
|
||||
m_hoveredInviteByLinkRow = -1;
|
||||
m_hoveredSettingsRow = -1;
|
||||
QModelIndex idx = indexAt(e->pos());
|
||||
if (idx.isValid()) {
|
||||
if (idx.isValid() && !idx.data(ChannelIsSectionRole).toBool()) {
|
||||
QRect gearRect = ChannelDelegate::settingsButtonRect(visualRect(idx));
|
||||
QRect invRect = ChannelDelegate::inviteByLinkButtonRect(visualRect(idx));
|
||||
QRect plusRect = ChannelDelegate::inviteButtonRect(visualRect(idx));
|
||||
@@ -81,6 +82,8 @@ protected:
|
||||
QListView::mouseMoveEvent(e);
|
||||
}
|
||||
QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& idx, const QEvent* e) const override {
|
||||
if (idx.isValid() && idx.data(ChannelIsSectionRole).toBool())
|
||||
return QItemSelectionModel::NoUpdate;
|
||||
if (idx.isValid())
|
||||
return QItemSelectionModel::ClearAndSelect;
|
||||
return QItemSelectionModel::NoUpdate;
|
||||
@@ -236,6 +239,34 @@ void ChannelList::loadChannels() {
|
||||
(long long)ch.lastMsgAt);
|
||||
ci++;
|
||||
}
|
||||
|
||||
/* ── секция «Личные» (DM-беседы) ── */
|
||||
auto dms = m_db->getDmConversations();
|
||||
if (!dms.isEmpty()) {
|
||||
auto *section = new QStandardItem();
|
||||
section->setData(QStringLiteral("Личные"), ChannelNameRole);
|
||||
section->setData(true, ChannelIsSectionRole);
|
||||
section->setFlags(Qt::NoItemFlags);
|
||||
m_model->appendRow(section);
|
||||
|
||||
static const QColor dmColor(0x8E, 0x44, 0xAD);
|
||||
for (const auto& dm : dms) {
|
||||
QString name = dm.peerName;
|
||||
if (name.isEmpty()) name = QString("0x%1").arg(dm.peerNodeId, 4, 16, QChar('0')).toUpper();
|
||||
auto letter = name.mid(0, 1).toUpper();
|
||||
if (letter.isEmpty()) letter = "@";
|
||||
auto *item = new QStandardItem();
|
||||
item->setData(name, ChannelNameRole);
|
||||
item->setData(QStringLiteral("dm:") + dm.convId, ChannelChannelIdRole);
|
||||
item->setData(QString(), ChannelLastMessageRole);
|
||||
item->setData(0, ChannelUnreadCountRole);
|
||||
item->setData(dm.lastTs, ChannelLastMsgAtRole);
|
||||
item->setData(makeChannelIcon(dmColor, letter), ChannelIconRole);
|
||||
m_model->appendRow(item);
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "ChannelList::loadChannels dm row=%d conv='%s' peer='%s'",
|
||||
m_model->rowCount()-1, qPrintable(dm.convId), qPrintable(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
sel->blockSignals(false);
|
||||
|
||||
|
||||
Reference in new issue
Block a user