Discard pending file opening events when clearing UI state
This commit is contained in:
1 parent
0574d11037
commit
f5e8f94336
2 files changed
+2
No files matched your search
@@ -1973,6 +1973,7 @@ class ChatViewModel : ViewModel() {
|
||||
/** Main, после подтверждённого join worker: убрать все ссылки на удаляемую БД и завершить её ожидающие отправки. */
|
||||
fun clearState() {
|
||||
cancelDmStart(); _dmStartFailed.value = false; _dmOpen.value = null
|
||||
openingDmFiles.clear()
|
||||
++channelRefreshRevision; ++messageRefreshRevision; ++jumpRevision
|
||||
++editRevision; ++replyRevision
|
||||
for (id in submissions.keys.toList()) submissionResult(id, false)
|
||||
|
||||
@@ -869,6 +869,7 @@ MessageList::MessageList(DbManager* db, AudioRecorder* recorder, QWidget *parent
|
||||
|
||||
void MessageList::loadChannel(const QString& channelId) {
|
||||
QPointer<QWidget> prevFocus = QApplication::focusWidget();
|
||||
if (channelId.isEmpty()) m_openingDmFiles.clear();
|
||||
|
||||
const auto conversations = m_db && isDmChannel(channelId) ? m_db->getDmConversations() : QList<DmConversation>();
|
||||
quint64 generation = 0;
|
||||
|
||||
Reference in new issue
Block a user