mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Move requestDialogEntry to Histories.
This commit is contained in:
@@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_folder.h"
|
||||
#include "data/data_location.h"
|
||||
#include "data/data_histories.h"
|
||||
#include "base/unixtime.h"
|
||||
#include "history/history.h"
|
||||
#include "observer_peer.h"
|
||||
@@ -688,13 +689,14 @@ void ApplyChannelUpdate(
|
||||
const auto folder = folderId
|
||||
? channel->owner().folderLoaded(folderId)
|
||||
: nullptr;
|
||||
auto &histories = channel->owner().histories();
|
||||
if (folder && history->folder() != folder) {
|
||||
// If history folder is unknown or not synced, request both.
|
||||
channel->session().api().requestDialogEntry(history);
|
||||
channel->session().api().requestDialogEntry(folder);
|
||||
histories.requestDialogEntry(history);
|
||||
histories.requestDialogEntry(folder);
|
||||
} else if (!history->folderKnown()
|
||||
|| channel->pts() != update.vpts().v) {
|
||||
channel->session().api().requestDialogEntry(history);
|
||||
histories.requestDialogEntry(history);
|
||||
} else {
|
||||
history->applyDialogFields(
|
||||
history->folder(),
|
||||
|
Reference in New Issue
Block a user