Open and refresh DM member panels on conversation selection
This commit is contained in:
1 parent
7939002dba
commit
a89c204586
3 files changed
+9
-2
No files matched your search
@@ -736,6 +736,9 @@ void MainWindow::setupBridgeCallbacks() {
|
||||
});
|
||||
|
||||
/* ── DM (p2p чат) ── */
|
||||
gui_bridge_set_dm_members_cb([](const uint8_t* data, int len) {
|
||||
if (s_mainWindow && s_mainWindow->m_accountList) s_mainWindow->m_accountList->onDmMembers(data, len);
|
||||
});
|
||||
gui_bridge_set_dm_conv_updated_cb([](const char* conv_id, int conv_id_len, uint64_t generation) {
|
||||
if (s_mainWindow)
|
||||
s_mainWindow->onDmConvUpdated(QString::fromUtf8(conv_id, conv_id_len), generation);
|
||||
@@ -872,7 +875,7 @@ void MainWindow::setupConnects() {
|
||||
m_messageList->loadChannel(channelId);
|
||||
if (channelId.startsWith(QStringLiteral("dm:"))) {
|
||||
/* DM: беседа уже создана/обслуживается dm_core */
|
||||
m_accountList->setChannel(QString());
|
||||
m_accountList->setChannel(channelId);
|
||||
m_channelList->setChannelUnreadCount(channelId, 0);
|
||||
return;
|
||||
}
|
||||
@@ -1191,7 +1194,7 @@ void MainWindow::onDmConvUpdated(const QString& convId, quint64 generation) {
|
||||
}
|
||||
QString key = QStringLiteral("dm:") + convId;
|
||||
m_channelList->loadChannels();
|
||||
if (m_currentChannelId == key) m_messageList->loadChannel(key);
|
||||
if (m_currentChannelId == key) { m_messageList->loadChannel(key); m_accountList->setChannel(key); }
|
||||
}
|
||||
|
||||
void MainWindow::onDmStartResult(quint64 request, const QString& convId, quint64 generation, bool success) {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
<TS version="2.1" language="en_US" sourcelanguage="en_US">
|
||||
<context>
|
||||
<name>ChatGui</name>
|
||||
<message><source>My devices</source><translation>My devices</translation></message>
|
||||
<message><source>Peer devices</source><translation>Peer devices</translation></message>
|
||||
<message><source>Deleted accounts</source><translation>Deleted</translation></message>
|
||||
<message><source>Expand deleted accounts</source><translation>Expand deleted accounts</translation></message>
|
||||
<message><source>Collapse deleted accounts</source><translation>Collapse deleted accounts</translation></message>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
<TS version="2.1" language="ru_RU" sourcelanguage="en_US">
|
||||
<context>
|
||||
<name>ChatGui</name>
|
||||
<message><source>My devices</source><translation>Мои устройства</translation></message>
|
||||
<message><source>Peer devices</source><translation>Устройства собеседника</translation></message>
|
||||
<message><source>Deleted accounts</source><translation>Удалённые</translation></message>
|
||||
<message><source>Expand deleted accounts</source><translation>Развернуть удалённые аккаунты</translation></message>
|
||||
<message><source>Collapse deleted accounts</source><translation>Свернуть удалённые аккаунты</translation></message>
|
||||
|
||||
Reference in new issue
Block a user