mirror of https://github.com/procxx/kepka.git
Request history parts through Histories.
This commit is contained in:
parent
818f5cd004
commit
6f672ecdc3
|
@ -1012,34 +1012,6 @@ rpl::producer<bool> ApiWrap::dialogsLoadBlockedByDate() const {
|
||||||
return _dialogsLoadBlockedByDate.value();
|
return _dialogsLoadBlockedByDate.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApiWrap::requestFakeChatListMessage(
|
|
||||||
not_null<History*> history) {
|
|
||||||
if (_fakeChatListRequests.contains(history)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_fakeChatListRequests.emplace(history);
|
|
||||||
request(MTPmessages_GetHistory(
|
|
||||||
history->peer->input,
|
|
||||||
MTP_int(0), // offset_id
|
|
||||||
MTP_int(0), // offset_date
|
|
||||||
MTP_int(0), // add_offset
|
|
||||||
MTP_int(2), // limit
|
|
||||||
MTP_int(0), // max_id
|
|
||||||
MTP_int(0), // min_id
|
|
||||||
MTP_int(0)
|
|
||||||
)).done([=](const MTPmessages_Messages &result) {
|
|
||||||
_fakeChatListRequests.erase(history);
|
|
||||||
history->setFakeChatListMessageFrom(result);
|
|
||||||
}).fail([=](const RPCError &error) {
|
|
||||||
_fakeChatListRequests.erase(history);
|
|
||||||
history->setFakeChatListMessageFrom(MTP_messages_messages(
|
|
||||||
MTP_vector<MTPMessage>(0),
|
|
||||||
MTP_vector<MTPChat>(0),
|
|
||||||
MTP_vector<MTPUser>(0)));
|
|
||||||
}).send();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ApiWrap::requestWallPaper(
|
void ApiWrap::requestWallPaper(
|
||||||
const QString &slug,
|
const QString &slug,
|
||||||
Fn<void(const Data::WallPaper &)> done,
|
Fn<void(const Data::WallPaper &)> done,
|
||||||
|
@ -3908,12 +3880,12 @@ void ApiWrap::requestSharedMedia(
|
||||||
SharedMediaType type,
|
SharedMediaType type,
|
||||||
MsgId messageId,
|
MsgId messageId,
|
||||||
SliceType slice) {
|
SliceType slice) {
|
||||||
auto key = std::make_tuple(peer, type, messageId, slice);
|
const auto key = std::make_tuple(peer, type, messageId, slice);
|
||||||
if (_sharedMediaRequests.contains(key)) {
|
if (_sharedMediaRequests.contains(key)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto prepared = Api::PrepareSearchRequest(
|
const auto prepared = Api::PrepareSearchRequest(
|
||||||
peer,
|
peer,
|
||||||
type,
|
type,
|
||||||
QString(),
|
QString(),
|
||||||
|
@ -3923,17 +3895,23 @@ void ApiWrap::requestSharedMedia(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto requestId = request(
|
const auto history = session().data().history(peer);
|
||||||
std::move(*prepared)
|
auto &histories = history->owner().histories();
|
||||||
).done([this, peer, type, messageId, slice](
|
const auto requestType = Data::Histories::RequestType::History;
|
||||||
const MTPmessages_Messages &result) {
|
histories.sendRequest(history, requestType, [=](Fn<void()> finish) {
|
||||||
auto key = std::make_tuple(peer, type, messageId, slice);
|
return request(
|
||||||
_sharedMediaRequests.remove(key);
|
std::move(*prepared)
|
||||||
sharedMediaDone(peer, type, messageId, slice, result);
|
).done([=](const MTPmessages_Messages &result) {
|
||||||
}).fail([this, key](const RPCError &error) {
|
const auto key = std::make_tuple(peer, type, messageId, slice);
|
||||||
_sharedMediaRequests.remove(key);
|
_sharedMediaRequests.remove(key);
|
||||||
}).send();
|
sharedMediaDone(peer, type, messageId, slice, result);
|
||||||
_sharedMediaRequests.emplace(key, requestId);
|
finish();
|
||||||
|
}).fail([=](const RPCError &error) {
|
||||||
|
_sharedMediaRequests.remove(key);
|
||||||
|
finish();
|
||||||
|
}).send();
|
||||||
|
});
|
||||||
|
_sharedMediaRequests.emplace(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApiWrap::sharedMediaDone(
|
void ApiWrap::sharedMediaDone(
|
||||||
|
|
|
@ -177,7 +177,6 @@ public:
|
||||||
//void setFeedChannels(
|
//void setFeedChannels(
|
||||||
// not_null<Data::Feed*> feed,
|
// not_null<Data::Feed*> feed,
|
||||||
// const std::vector<not_null<ChannelData*>> &channels);
|
// const std::vector<not_null<ChannelData*>> &channels);
|
||||||
void requestFakeChatListMessage(not_null<History*> history);
|
|
||||||
|
|
||||||
void requestWallPaper(
|
void requestWallPaper(
|
||||||
const QString &slug,
|
const QString &slug,
|
||||||
|
@ -739,15 +738,14 @@ private:
|
||||||
|
|
||||||
mtpRequestId _contactsRequestId = 0;
|
mtpRequestId _contactsRequestId = 0;
|
||||||
mtpRequestId _contactsStatusesRequestId = 0;
|
mtpRequestId _contactsStatusesRequestId = 0;
|
||||||
base::flat_set<not_null<History*>> _fakeChatListRequests;
|
|
||||||
|
|
||||||
base::flat_map<not_null<History*>, mtpRequestId> _unreadMentionsRequests;
|
base::flat_map<not_null<History*>, mtpRequestId> _unreadMentionsRequests;
|
||||||
|
|
||||||
base::flat_map<std::tuple<
|
base::flat_set<std::tuple<
|
||||||
not_null<PeerData*>,
|
not_null<PeerData*>,
|
||||||
SharedMediaType,
|
SharedMediaType,
|
||||||
MsgId,
|
MsgId,
|
||||||
SliceType>, mtpRequestId> _sharedMediaRequests;
|
SliceType>> _sharedMediaRequests;
|
||||||
|
|
||||||
base::flat_map<not_null<UserData*>, mtpRequestId> _userPhotosRequests;
|
base::flat_map<not_null<UserData*>, mtpRequestId> _userPhotosRequests;
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ private:
|
||||||
MTP::Sender _api;
|
MTP::Sender _api;
|
||||||
|
|
||||||
MsgId _offsetId = 0;
|
MsgId _offsetId = 0;
|
||||||
mtpRequestId _loadRequestId = 0;
|
int _loadRequestId = 0; // Not a real mtpRequestId.
|
||||||
bool _allLoaded = false;
|
bool _allLoaded = false;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -333,6 +333,38 @@ void Histories::changeDialogUnreadMark(
|
||||||
)).send();
|
)).send();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Histories::requestFakeChatListMessage(
|
||||||
|
not_null<History*> history) {
|
||||||
|
if (_fakeChatListRequests.contains(history)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_fakeChatListRequests.emplace(history);
|
||||||
|
sendRequest(history, RequestType::History, [=](Fn<void()> finish) {
|
||||||
|
return session().api().request(MTPmessages_GetHistory(
|
||||||
|
history->peer->input,
|
||||||
|
MTP_int(0), // offset_id
|
||||||
|
MTP_int(0), // offset_date
|
||||||
|
MTP_int(0), // add_offset
|
||||||
|
MTP_int(2), // limit
|
||||||
|
MTP_int(0), // max_id
|
||||||
|
MTP_int(0), // min_id
|
||||||
|
MTP_int(0)
|
||||||
|
)).done([=](const MTPmessages_Messages &result) {
|
||||||
|
_fakeChatListRequests.erase(history);
|
||||||
|
history->setFakeChatListMessageFrom(result);
|
||||||
|
finish();
|
||||||
|
}).fail([=](const RPCError &error) {
|
||||||
|
_fakeChatListRequests.erase(history);
|
||||||
|
history->setFakeChatListMessageFrom(MTP_messages_messages(
|
||||||
|
MTP_vector<MTPMessage>(0),
|
||||||
|
MTP_vector<MTPChat>(0),
|
||||||
|
MTP_vector<MTPUser>(0)));
|
||||||
|
finish();
|
||||||
|
}).send();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void Histories::sendPendingReadInbox(not_null<History*> history) {
|
void Histories::sendPendingReadInbox(not_null<History*> history) {
|
||||||
if (const auto state = lookup(history)) {
|
if (const auto state = lookup(history)) {
|
||||||
if (state->readTill
|
if (state->readTill
|
||||||
|
|
|
@ -56,6 +56,7 @@ public:
|
||||||
void dialogEntryApplied(not_null<History*> history);
|
void dialogEntryApplied(not_null<History*> history);
|
||||||
void changeDialogUnreadMark(not_null<History*> history, bool unread);
|
void changeDialogUnreadMark(not_null<History*> history, bool unread);
|
||||||
//void changeDialogUnreadMark(not_null<Data::Feed*> feed, bool unread); // #feed
|
//void changeDialogUnreadMark(not_null<Data::Feed*> feed, bool unread); // #feed
|
||||||
|
void requestFakeChatListMessage(not_null<History*> history);
|
||||||
|
|
||||||
void deleteMessages(
|
void deleteMessages(
|
||||||
not_null<History*> history,
|
not_null<History*> history,
|
||||||
|
@ -121,6 +122,8 @@ private:
|
||||||
not_null<History*>,
|
not_null<History*>,
|
||||||
std::vector<Fn<void()>>> _dialogRequestsPending;
|
std::vector<Fn<void()>>> _dialogRequestsPending;
|
||||||
|
|
||||||
|
base::flat_set<not_null<History*>> _fakeChatListRequests;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Data
|
} // namespace Data
|
||||||
|
|
|
@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "data/data_messages.h"
|
#include "data/data_messages.h"
|
||||||
#include "data/data_channel.h"
|
#include "data/data_channel.h"
|
||||||
|
#include "data/data_histories.h"
|
||||||
#include "history/history.h"
|
#include "history/history.h"
|
||||||
#include "history/history_item.h"
|
#include "history/history_item.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
@ -193,7 +194,8 @@ SearchController::CacheEntry::CacheEntry(const Query &query)
|
||||||
}
|
}
|
||||||
|
|
||||||
SearchController::SearchController(not_null<Main::Session*> session)
|
SearchController::SearchController(not_null<Main::Session*> session)
|
||||||
: _api(session->api().instance()) {
|
: _session(session)
|
||||||
|
, _api(session->api().instance()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SearchController::hasInCache(const Query &query) const {
|
bool SearchController::hasInCache(const Query &query) const {
|
||||||
|
@ -366,23 +368,32 @@ void SearchController::requestMore(
|
||||||
if (!prepared) {
|
if (!prepared) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
auto requestId = _api.request(
|
auto &histories = _session->data().histories();
|
||||||
std::move(*prepared)
|
const auto type = Histories::RequestType::History;
|
||||||
).done([=](const MTPmessages_Messages &result) {
|
const auto history = _session->data().history(listData->peer);
|
||||||
listData->requests.remove(key);
|
auto requestId = histories.sendRequest(history, type, [=](Fn<void()> finish) {
|
||||||
auto parsed = ParseSearchResult(
|
return _api.request(
|
||||||
listData->peer,
|
std::move(*prepared)
|
||||||
query.type,
|
).done([=](const MTPmessages_Messages &result) {
|
||||||
key.aroundId,
|
listData->requests.remove(key);
|
||||||
key.direction,
|
auto parsed = ParseSearchResult(
|
||||||
result);
|
listData->peer,
|
||||||
listData->list.addSlice(
|
query.type,
|
||||||
std::move(parsed.messageIds),
|
key.aroundId,
|
||||||
parsed.noSkipRange,
|
key.direction,
|
||||||
parsed.fullCount);
|
result);
|
||||||
}).send();
|
listData->list.addSlice(
|
||||||
|
std::move(parsed.messageIds),
|
||||||
|
parsed.noSkipRange,
|
||||||
|
parsed.fullCount);
|
||||||
|
finish();
|
||||||
|
}).fail([=](const RPCError &error) {
|
||||||
|
finish();
|
||||||
|
}).send();
|
||||||
|
});
|
||||||
listData->requests.emplace(key, [=] {
|
listData->requests.emplace(key, [=] {
|
||||||
_api.request(requestId).cancel();
|
auto &histories = _session->data().histories();
|
||||||
|
histories.cancelRequest(history, requestId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,7 @@ private:
|
||||||
const Query &query,
|
const Query &query,
|
||||||
Data *listData);
|
Data *listData);
|
||||||
|
|
||||||
|
const not_null<Main::Session*> _session;
|
||||||
MTP::Sender _api;
|
MTP::Sender _api;
|
||||||
Cache _cache;
|
Cache _cache;
|
||||||
Cache::iterator _current = _cache.end();
|
Cache::iterator _current = _cache.end();
|
||||||
|
|
|
@ -1015,94 +1015,95 @@ void Widget::searchReceived(
|
||||||
? *_singleMessageSearch.lookup(_searchQuery)
|
? *_singleMessageSearch.lookup(_searchQuery)
|
||||||
: nullptr;
|
: nullptr;
|
||||||
|
|
||||||
if (_searchRequest == requestId) {
|
if (_searchRequest != requestId) {
|
||||||
switch (result.type()) {
|
return;
|
||||||
case mtpc_messages_messages: {
|
}
|
||||||
auto &d = result.c_messages_messages();
|
switch (result.type()) {
|
||||||
if (_searchRequest != 0) {
|
case mtpc_messages_messages: {
|
||||||
// Don't apply cached data!
|
auto &d = result.c_messages_messages();
|
||||||
session().data().processUsers(d.vusers());
|
if (_searchRequest != 0) {
|
||||||
session().data().processChats(d.vchats());
|
// Don't apply cached data!
|
||||||
}
|
session().data().processUsers(d.vusers());
|
||||||
auto &msgs = d.vmessages().v;
|
session().data().processChats(d.vchats());
|
||||||
_inner->searchReceived(msgs, inject, type, msgs.size());
|
}
|
||||||
|
auto &msgs = d.vmessages().v;
|
||||||
|
_inner->searchReceived(msgs, inject, type, msgs.size());
|
||||||
|
if (type == SearchRequestType::MigratedFromStart || type == SearchRequestType::MigratedFromOffset) {
|
||||||
|
_searchFullMigrated = true;
|
||||||
|
} else {
|
||||||
|
_searchFull = true;
|
||||||
|
}
|
||||||
|
} break;
|
||||||
|
|
||||||
|
case mtpc_messages_messagesSlice: {
|
||||||
|
auto &d = result.c_messages_messagesSlice();
|
||||||
|
if (_searchRequest != 0) {
|
||||||
|
// Don't apply cached data!
|
||||||
|
session().data().processUsers(d.vusers());
|
||||||
|
session().data().processChats(d.vchats());
|
||||||
|
}
|
||||||
|
auto &msgs = d.vmessages().v;
|
||||||
|
const auto someAdded = _inner->searchReceived(msgs, inject, type, d.vcount().v);
|
||||||
|
const auto nextRate = d.vnext_rate();
|
||||||
|
const auto rateUpdated = nextRate && (nextRate->v != _searchNextRate);
|
||||||
|
const auto finished = (type == SearchRequestType::FromStart || type == SearchRequestType::FromOffset)
|
||||||
|
? !rateUpdated
|
||||||
|
: !someAdded;
|
||||||
|
if (rateUpdated) {
|
||||||
|
_searchNextRate = nextRate->v;
|
||||||
|
}
|
||||||
|
if (finished) {
|
||||||
if (type == SearchRequestType::MigratedFromStart || type == SearchRequestType::MigratedFromOffset) {
|
if (type == SearchRequestType::MigratedFromStart || type == SearchRequestType::MigratedFromOffset) {
|
||||||
_searchFullMigrated = true;
|
_searchFullMigrated = true;
|
||||||
} else {
|
} else {
|
||||||
_searchFull = true;
|
_searchFull = true;
|
||||||
}
|
}
|
||||||
} break;
|
}
|
||||||
|
} break;
|
||||||
|
|
||||||
case mtpc_messages_messagesSlice: {
|
case mtpc_messages_channelMessages: {
|
||||||
auto &d = result.c_messages_messagesSlice();
|
auto &d = result.c_messages_channelMessages();
|
||||||
if (_searchRequest != 0) {
|
if (const auto peer = _searchInChat.peer()) {
|
||||||
// Don't apply cached data!
|
if (const auto channel = peer->asChannel()) {
|
||||||
session().data().processUsers(d.vusers());
|
channel->ptsReceived(d.vpts().v);
|
||||||
session().data().processChats(d.vchats());
|
|
||||||
}
|
|
||||||
auto &msgs = d.vmessages().v;
|
|
||||||
const auto someAdded = _inner->searchReceived(msgs, inject, type, d.vcount().v);
|
|
||||||
const auto nextRate = d.vnext_rate();
|
|
||||||
const auto rateUpdated = nextRate && (nextRate->v != _searchNextRate);
|
|
||||||
const auto finished = (type == SearchRequestType::FromStart || type == SearchRequestType::FromOffset)
|
|
||||||
? !rateUpdated
|
|
||||||
: !someAdded;
|
|
||||||
if (rateUpdated) {
|
|
||||||
_searchNextRate = nextRate->v;
|
|
||||||
}
|
|
||||||
if (finished) {
|
|
||||||
if (type == SearchRequestType::MigratedFromStart || type == SearchRequestType::MigratedFromOffset) {
|
|
||||||
_searchFullMigrated = true;
|
|
||||||
} else {
|
|
||||||
_searchFull = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} break;
|
|
||||||
|
|
||||||
case mtpc_messages_channelMessages: {
|
|
||||||
auto &d = result.c_messages_channelMessages();
|
|
||||||
if (const auto peer = _searchInChat.peer()) {
|
|
||||||
if (const auto channel = peer->asChannel()) {
|
|
||||||
channel->ptsReceived(d.vpts().v);
|
|
||||||
} else {
|
|
||||||
LOG(("API Error: "
|
|
||||||
"received messages.channelMessages when no channel "
|
|
||||||
"was passed! (Widget::searchReceived)"));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
LOG(("API Error: "
|
LOG(("API Error: "
|
||||||
"received messages.channelMessages when no channel "
|
"received messages.channelMessages when no channel "
|
||||||
"was passed! (Widget::searchReceived)"));
|
"was passed! (Widget::searchReceived)"));
|
||||||
}
|
}
|
||||||
if (_searchRequest != 0) {
|
} else {
|
||||||
// Don't apply cached data!
|
LOG(("API Error: "
|
||||||
session().data().processUsers(d.vusers());
|
"received messages.channelMessages when no channel "
|
||||||
session().data().processChats(d.vchats());
|
"was passed! (Widget::searchReceived)"));
|
||||||
}
|
}
|
||||||
auto &msgs = d.vmessages().v;
|
if (_searchRequest != 0) {
|
||||||
if (!_inner->searchReceived(msgs, inject, type, d.vcount().v)) {
|
// Don't apply cached data!
|
||||||
if (type == SearchRequestType::MigratedFromStart || type == SearchRequestType::MigratedFromOffset) {
|
session().data().processUsers(d.vusers());
|
||||||
_searchFullMigrated = true;
|
session().data().processChats(d.vchats());
|
||||||
} else {
|
}
|
||||||
_searchFull = true;
|
auto &msgs = d.vmessages().v;
|
||||||
}
|
if (!_inner->searchReceived(msgs, inject, type, d.vcount().v)) {
|
||||||
}
|
|
||||||
} break;
|
|
||||||
|
|
||||||
case mtpc_messages_messagesNotModified: {
|
|
||||||
LOG(("API Error: received messages.messagesNotModified! (Widget::searchReceived)"));
|
|
||||||
if (type == SearchRequestType::MigratedFromStart || type == SearchRequestType::MigratedFromOffset) {
|
if (type == SearchRequestType::MigratedFromStart || type == SearchRequestType::MigratedFromOffset) {
|
||||||
_searchFullMigrated = true;
|
_searchFullMigrated = true;
|
||||||
} else {
|
} else {
|
||||||
_searchFull = true;
|
_searchFull = true;
|
||||||
}
|
}
|
||||||
} break;
|
|
||||||
}
|
}
|
||||||
|
} break;
|
||||||
|
|
||||||
_searchRequest = 0;
|
case mtpc_messages_messagesNotModified: {
|
||||||
onListScroll();
|
LOG(("API Error: received messages.messagesNotModified! (Widget::searchReceived)"));
|
||||||
update();
|
if (type == SearchRequestType::MigratedFromStart || type == SearchRequestType::MigratedFromOffset) {
|
||||||
|
_searchFullMigrated = true;
|
||||||
|
} else {
|
||||||
|
_searchFull = true;
|
||||||
|
}
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_searchRequest = 0;
|
||||||
|
onListScroll();
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::peerSearchReceived(
|
void Widget::peerSearchReceived(
|
||||||
|
|
|
@ -2480,7 +2480,7 @@ void History::setFakeChatListMessage() {
|
||||||
if (const auto chat = peer->asChat()) {
|
if (const auto chat = peer->asChat()) {
|
||||||
// In chats we try to take the item before the 'last', which
|
// In chats we try to take the item before the 'last', which
|
||||||
// is the empty-displayed migration message.
|
// is the empty-displayed migration message.
|
||||||
session().api().requestFakeChatListMessage(this);
|
owner().histories().requestFakeChatListMessage(this);
|
||||||
} else if (const auto from = migrateFrom()) {
|
} else if (const auto from = migrateFrom()) {
|
||||||
// In megagroups we just try to use
|
// In megagroups we just try to use
|
||||||
// the message from the original group.
|
// the message from the original group.
|
||||||
|
|
|
@ -1716,9 +1716,8 @@ void HistoryWidget::showHistory(
|
||||||
session().data().stopPlayingVideoFiles();
|
session().data().stopPlayingVideoFiles();
|
||||||
|
|
||||||
clearReplyReturns();
|
clearReplyReturns();
|
||||||
clearAllLoadRequests();
|
|
||||||
|
|
||||||
if (_history) {
|
if (_history) {
|
||||||
|
clearAllLoadRequests();
|
||||||
if (Ui::InFocusChain(_list)) {
|
if (Ui::InFocusChain(_list)) {
|
||||||
// Removing focus from list clears selected and updates top bar.
|
// Removing focus from list clears selected and updates top bar.
|
||||||
setFocus();
|
setFocus();
|
||||||
|
@ -1917,19 +1916,34 @@ void HistoryWidget::showHistory(
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::clearDelayedShowAt() {
|
void HistoryWidget::clearDelayedShowAt() {
|
||||||
|
Expects(_history != nullptr);
|
||||||
|
|
||||||
_delayedShowAtMsgId = -1;
|
_delayedShowAtMsgId = -1;
|
||||||
if (_delayedShowAtRequest) {
|
if (_delayedShowAtRequest) {
|
||||||
MTP::cancel(_delayedShowAtRequest);
|
_history->owner().histories().cancelRequest(
|
||||||
|
_history,
|
||||||
|
_delayedShowAtRequest);
|
||||||
_delayedShowAtRequest = 0;
|
_delayedShowAtRequest = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::clearAllLoadRequests() {
|
void HistoryWidget::clearAllLoadRequests() {
|
||||||
|
Expects(_history != nullptr);
|
||||||
|
|
||||||
|
auto &histories = _history->owner().histories();
|
||||||
clearDelayedShowAt();
|
clearDelayedShowAt();
|
||||||
if (_firstLoadRequest) MTP::cancel(_firstLoadRequest);
|
if (_firstLoadRequest) {
|
||||||
if (_preloadRequest) MTP::cancel(_preloadRequest);
|
histories.cancelRequest(_history, _firstLoadRequest);
|
||||||
if (_preloadDownRequest) MTP::cancel(_preloadDownRequest);
|
_firstLoadRequest = 0;
|
||||||
_preloadRequest = _preloadDownRequest = _firstLoadRequest = 0;
|
}
|
||||||
|
if (_preloadRequest) {
|
||||||
|
histories.cancelRequest(_history, _preloadRequest);
|
||||||
|
_preloadRequest = 0;
|
||||||
|
}
|
||||||
|
if (_preloadDownRequest) {
|
||||||
|
histories.cancelRequest(_history, _preloadDownRequest);
|
||||||
|
_preloadDownRequest = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::updateFieldSubmitSettings() {
|
void HistoryWidget::updateFieldSubmitSettings() {
|
||||||
|
@ -2330,8 +2344,10 @@ void HistoryWidget::unreadCountUpdated() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HistoryWidget::messagesFailed(const RPCError &error, mtpRequestId requestId) {
|
bool HistoryWidget::messagesFailed(const RPCError &error, int requestId) {
|
||||||
if (MTP::isDefaultHandledError(error)) return false;
|
if (MTP::isDefaultHandledError(error)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (error.type() == qstr("CHANNEL_PRIVATE")
|
if (error.type() == qstr("CHANNEL_PRIVATE")
|
||||||
|| error.type() == qstr("CHANNEL_PUBLIC_GROUP_NA")
|
|| error.type() == qstr("CHANNEL_PUBLIC_GROUP_NA")
|
||||||
|
@ -2356,15 +2372,20 @@ bool HistoryWidget::messagesFailed(const RPCError &error, mtpRequestId requestId
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::messagesReceived(PeerData *peer, const MTPmessages_Messages &messages, mtpRequestId requestId) {
|
void HistoryWidget::messagesReceived(PeerData *peer, const MTPmessages_Messages &messages, int requestId) {
|
||||||
if (!_history) {
|
Expects(_history != nullptr);
|
||||||
_preloadRequest = _preloadDownRequest = _firstLoadRequest = _delayedShowAtRequest = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool toMigrated = (peer == _peer->migrateFrom());
|
bool toMigrated = (peer == _peer->migrateFrom());
|
||||||
if (peer != _peer && !toMigrated) {
|
if (peer != _peer && !toMigrated) {
|
||||||
_preloadRequest = _preloadDownRequest = _firstLoadRequest = _delayedShowAtRequest = 0;
|
if (_preloadRequest == requestId) {
|
||||||
|
_preloadRequest = 0;
|
||||||
|
} else if (_preloadDownRequest == requestId) {
|
||||||
|
_preloadDownRequest = 0;
|
||||||
|
} else if (_firstLoadRequest == requestId) {
|
||||||
|
_firstLoadRequest = 0;
|
||||||
|
} else if (_delayedShowAtRequest == requestId) {
|
||||||
|
_delayedShowAtRequest = 0;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2456,10 +2477,7 @@ void HistoryWidget::messagesReceived(PeerData *peer, const MTPmessages_Messages
|
||||||
_delayedShowAtRequest = 0;
|
_delayedShowAtRequest = 0;
|
||||||
_history->getReadyFor(_delayedShowAtMsgId);
|
_history->getReadyFor(_delayedShowAtMsgId);
|
||||||
if (_history->isEmpty()) {
|
if (_history->isEmpty()) {
|
||||||
if (_preloadRequest) MTP::cancel(_preloadRequest);
|
clearAllLoadRequests();
|
||||||
if (_preloadDownRequest) MTP::cancel(_preloadDownRequest);
|
|
||||||
if (_firstLoadRequest) MTP::cancel(_firstLoadRequest);
|
|
||||||
_preloadRequest = _preloadDownRequest = 0;
|
|
||||||
_firstLoadRequest = -1; // hack - don't updateListSize yet
|
_firstLoadRequest = -1; // hack - don't updateListSize yet
|
||||||
addMessagesToFront(peer, *histList);
|
addMessagesToFront(peer, *histList);
|
||||||
_firstLoadRequest = 0;
|
_firstLoadRequest = 0;
|
||||||
|
@ -2520,14 +2538,14 @@ void HistoryWidget::firstLoadMessages() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto from = _peer;
|
auto from = _history;
|
||||||
auto offsetId = 0;
|
auto offsetId = 0;
|
||||||
auto offset = 0;
|
auto offset = 0;
|
||||||
auto loadCount = kMessagesPerPage;
|
auto loadCount = kMessagesPerPage;
|
||||||
if (_showAtMsgId == ShowAtUnreadMsgId) {
|
if (_showAtMsgId == ShowAtUnreadMsgId) {
|
||||||
if (const auto around = _migrated ? _migrated->loadAroundId() : 0) {
|
if (const auto around = _migrated ? _migrated->loadAroundId() : 0) {
|
||||||
_history->getReadyFor(_showAtMsgId);
|
_history->getReadyFor(_showAtMsgId);
|
||||||
from = _migrated->peer;
|
from = _migrated;
|
||||||
offset = -loadCount / 2;
|
offset = -loadCount / 2;
|
||||||
offsetId = around;
|
offsetId = around;
|
||||||
} else if (const auto around = _history->loadAroundId()) {
|
} else if (const auto around = _history->loadAroundId()) {
|
||||||
|
@ -2547,7 +2565,7 @@ void HistoryWidget::firstLoadMessages() {
|
||||||
} else if (_showAtMsgId < 0 && _history->isChannel()) {
|
} else if (_showAtMsgId < 0 && _history->isChannel()) {
|
||||||
if (_showAtMsgId < 0 && -_showAtMsgId < ServerMaxMsgId && _migrated) {
|
if (_showAtMsgId < 0 && -_showAtMsgId < ServerMaxMsgId && _migrated) {
|
||||||
_history->getReadyFor(_showAtMsgId);
|
_history->getReadyFor(_showAtMsgId);
|
||||||
from = _migrated->peer;
|
from = _migrated;
|
||||||
offset = -loadCount / 2;
|
offset = -loadCount / 2;
|
||||||
offsetId = -_showAtMsgId;
|
offsetId = -_showAtMsgId;
|
||||||
} else if (_showAtMsgId == SwitchAtTopMsgId) {
|
} else if (_showAtMsgId == SwitchAtTopMsgId) {
|
||||||
|
@ -2560,18 +2578,27 @@ void HistoryWidget::firstLoadMessages() {
|
||||||
auto minId = 0;
|
auto minId = 0;
|
||||||
auto historyHash = 0;
|
auto historyHash = 0;
|
||||||
|
|
||||||
_firstLoadRequest = MTP::send(
|
const auto history = from;
|
||||||
MTPmessages_GetHistory(
|
const auto type = Data::Histories::RequestType::History;
|
||||||
from->input,
|
auto &histories = history->owner().histories();
|
||||||
|
_firstLoadRequest = histories.sendRequest(history, type, [=](Fn<void()> finish) {
|
||||||
|
return history->session().api().request(MTPmessages_GetHistory(
|
||||||
|
history->peer->input,
|
||||||
MTP_int(offsetId),
|
MTP_int(offsetId),
|
||||||
MTP_int(offsetDate),
|
MTP_int(offsetDate),
|
||||||
MTP_int(offset),
|
MTP_int(offset),
|
||||||
MTP_int(loadCount),
|
MTP_int(loadCount),
|
||||||
MTP_int(maxId),
|
MTP_int(maxId),
|
||||||
MTP_int(minId),
|
MTP_int(minId),
|
||||||
MTP_int(historyHash)),
|
MTP_int(historyHash)
|
||||||
rpcDone(&HistoryWidget::messagesReceived, from),
|
)).done([=](const MTPmessages_Messages &result) {
|
||||||
rpcFail(&HistoryWidget::messagesFailed));
|
messagesReceived(history->peer, result, _firstLoadRequest);
|
||||||
|
finish();
|
||||||
|
}).fail([=](const RPCError &error) {
|
||||||
|
messagesFailed(error, _firstLoadRequest);
|
||||||
|
finish();
|
||||||
|
}).send();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::loadMessages() {
|
void HistoryWidget::loadMessages() {
|
||||||
|
@ -2602,18 +2629,27 @@ void HistoryWidget::loadMessages() {
|
||||||
auto minId = 0;
|
auto minId = 0;
|
||||||
auto historyHash = 0;
|
auto historyHash = 0;
|
||||||
|
|
||||||
_preloadRequest = MTP::send(
|
const auto history = from;
|
||||||
MTPmessages_GetHistory(
|
const auto type = Data::Histories::RequestType::History;
|
||||||
from->peer->input,
|
auto &histories = history->owner().histories();
|
||||||
|
_preloadRequest = histories.sendRequest(history, type, [=](Fn<void()> finish) {
|
||||||
|
return history->session().api().request(MTPmessages_GetHistory(
|
||||||
|
history->peer->input,
|
||||||
MTP_int(offsetId),
|
MTP_int(offsetId),
|
||||||
MTP_int(offsetDate),
|
MTP_int(offsetDate),
|
||||||
MTP_int(addOffset),
|
MTP_int(addOffset),
|
||||||
MTP_int(loadCount),
|
MTP_int(loadCount),
|
||||||
MTP_int(maxId),
|
MTP_int(maxId),
|
||||||
MTP_int(minId),
|
MTP_int(minId),
|
||||||
MTP_int(historyHash)),
|
MTP_int(historyHash)
|
||||||
rpcDone(&HistoryWidget::messagesReceived, from->peer.get()),
|
)).done([=](const MTPmessages_Messages &result) {
|
||||||
rpcFail(&HistoryWidget::messagesFailed));
|
messagesReceived(history->peer, result, _preloadRequest);
|
||||||
|
finish();
|
||||||
|
}).fail([=](const RPCError &error) {
|
||||||
|
messagesFailed(error, _preloadRequest);
|
||||||
|
finish();
|
||||||
|
}).send();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::loadMessagesDown() {
|
void HistoryWidget::loadMessagesDown() {
|
||||||
|
@ -2644,18 +2680,27 @@ void HistoryWidget::loadMessagesDown() {
|
||||||
auto minId = 0;
|
auto minId = 0;
|
||||||
auto historyHash = 0;
|
auto historyHash = 0;
|
||||||
|
|
||||||
_preloadDownRequest = MTP::send(
|
const auto history = from;
|
||||||
MTPmessages_GetHistory(
|
const auto type = Data::Histories::RequestType::History;
|
||||||
from->peer->input,
|
auto &histories = history->owner().histories();
|
||||||
|
_preloadDownRequest = histories.sendRequest(history, type, [=](Fn<void()> finish) {
|
||||||
|
return history->session().api().request(MTPmessages_GetHistory(
|
||||||
|
history->peer->input,
|
||||||
MTP_int(offsetId + 1),
|
MTP_int(offsetId + 1),
|
||||||
MTP_int(offsetDate),
|
MTP_int(offsetDate),
|
||||||
MTP_int(addOffset),
|
MTP_int(addOffset),
|
||||||
MTP_int(loadCount),
|
MTP_int(loadCount),
|
||||||
MTP_int(maxId),
|
MTP_int(maxId),
|
||||||
MTP_int(minId),
|
MTP_int(minId),
|
||||||
MTP_int(historyHash)),
|
MTP_int(historyHash)
|
||||||
rpcDone(&HistoryWidget::messagesReceived, from->peer.get()),
|
)).done([=](const MTPmessages_Messages &result) {
|
||||||
rpcFail(&HistoryWidget::messagesFailed));
|
messagesReceived(history->peer, result, _preloadDownRequest);
|
||||||
|
finish();
|
||||||
|
}).fail([=](const RPCError &error) {
|
||||||
|
messagesFailed(error, _preloadDownRequest);
|
||||||
|
finish();
|
||||||
|
}).send();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::delayedShowAt(MsgId showAtMsgId) {
|
void HistoryWidget::delayedShowAt(MsgId showAtMsgId) {
|
||||||
|
@ -2667,13 +2712,13 @@ void HistoryWidget::delayedShowAt(MsgId showAtMsgId) {
|
||||||
clearDelayedShowAt();
|
clearDelayedShowAt();
|
||||||
_delayedShowAtMsgId = showAtMsgId;
|
_delayedShowAtMsgId = showAtMsgId;
|
||||||
|
|
||||||
auto from = _peer;
|
auto from = _history;
|
||||||
auto offsetId = 0;
|
auto offsetId = 0;
|
||||||
auto offset = 0;
|
auto offset = 0;
|
||||||
auto loadCount = kMessagesPerPage;
|
auto loadCount = kMessagesPerPage;
|
||||||
if (_delayedShowAtMsgId == ShowAtUnreadMsgId) {
|
if (_delayedShowAtMsgId == ShowAtUnreadMsgId) {
|
||||||
if (const auto around = _migrated ? _migrated->loadAroundId() : 0) {
|
if (const auto around = _migrated ? _migrated->loadAroundId() : 0) {
|
||||||
from = _migrated->peer;
|
from = _migrated;
|
||||||
offset = -loadCount / 2;
|
offset = -loadCount / 2;
|
||||||
offsetId = around;
|
offsetId = around;
|
||||||
} else if (const auto around = _history->loadAroundId()) {
|
} else if (const auto around = _history->loadAroundId()) {
|
||||||
|
@ -2689,7 +2734,7 @@ void HistoryWidget::delayedShowAt(MsgId showAtMsgId) {
|
||||||
offsetId = _delayedShowAtMsgId;
|
offsetId = _delayedShowAtMsgId;
|
||||||
} else if (_delayedShowAtMsgId < 0 && _history->isChannel()) {
|
} else if (_delayedShowAtMsgId < 0 && _history->isChannel()) {
|
||||||
if (_delayedShowAtMsgId < 0 && -_delayedShowAtMsgId < ServerMaxMsgId && _migrated) {
|
if (_delayedShowAtMsgId < 0 && -_delayedShowAtMsgId < ServerMaxMsgId && _migrated) {
|
||||||
from = _migrated->peer;
|
from = _migrated;
|
||||||
offset = -loadCount / 2;
|
offset = -loadCount / 2;
|
||||||
offsetId = -_delayedShowAtMsgId;
|
offsetId = -_delayedShowAtMsgId;
|
||||||
}
|
}
|
||||||
|
@ -2699,18 +2744,27 @@ void HistoryWidget::delayedShowAt(MsgId showAtMsgId) {
|
||||||
auto minId = 0;
|
auto minId = 0;
|
||||||
auto historyHash = 0;
|
auto historyHash = 0;
|
||||||
|
|
||||||
_delayedShowAtRequest = MTP::send(
|
const auto history = from;
|
||||||
MTPmessages_GetHistory(
|
const auto type = Data::Histories::RequestType::History;
|
||||||
from->input,
|
auto &histories = history->owner().histories();
|
||||||
|
_delayedShowAtRequest = histories.sendRequest(history, type, [=](Fn<void()> finish) {
|
||||||
|
return history->session().api().request(MTPmessages_GetHistory(
|
||||||
|
history->peer->input,
|
||||||
MTP_int(offsetId),
|
MTP_int(offsetId),
|
||||||
MTP_int(offsetDate),
|
MTP_int(offsetDate),
|
||||||
MTP_int(offset),
|
MTP_int(offset),
|
||||||
MTP_int(loadCount),
|
MTP_int(loadCount),
|
||||||
MTP_int(maxId),
|
MTP_int(maxId),
|
||||||
MTP_int(minId),
|
MTP_int(minId),
|
||||||
MTP_int(historyHash)),
|
MTP_int(historyHash)
|
||||||
rpcDone(&HistoryWidget::messagesReceived, from),
|
)).done([=](const MTPmessages_Messages &result) {
|
||||||
rpcFail(&HistoryWidget::messagesFailed));
|
messagesReceived(history->peer, result, _delayedShowAtRequest);
|
||||||
|
finish();
|
||||||
|
}).fail([=](const RPCError &error) {
|
||||||
|
messagesFailed(error, _delayedShowAtRequest);
|
||||||
|
finish();
|
||||||
|
}).send();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::onScroll() {
|
void HistoryWidget::onScroll() {
|
||||||
|
@ -2884,7 +2938,8 @@ void HistoryWidget::saveEditMsg() {
|
||||||
sendFlags |= MTPmessages_EditMessage::Flag::f_entities;
|
sendFlags |= MTPmessages_EditMessage::Flag::f_entities;
|
||||||
}
|
}
|
||||||
|
|
||||||
_saveEditMsgRequestId = MTP::send(
|
const auto history = _history;
|
||||||
|
_saveEditMsgRequestId = history->session().api().request(
|
||||||
MTPmessages_EditMessage(
|
MTPmessages_EditMessage(
|
||||||
MTP_flags(sendFlags),
|
MTP_flags(sendFlags),
|
||||||
_history->peer->input,
|
_history->peer->input,
|
||||||
|
@ -2893,9 +2948,12 @@ void HistoryWidget::saveEditMsg() {
|
||||||
MTPInputMedia(),
|
MTPInputMedia(),
|
||||||
MTPReplyMarkup(),
|
MTPReplyMarkup(),
|
||||||
sentEntities,
|
sentEntities,
|
||||||
MTP_int(0)), // schedule_date
|
MTP_int(0)
|
||||||
rpcDone(&HistoryWidget::saveEditMsgDone, _history),
|
)).done([=](const MTPUpdates &result, mtpRequestId requestId) {
|
||||||
rpcFail(&HistoryWidget::saveEditMsgFail, _history));
|
saveEditMsgDone(history, result, requestId);
|
||||||
|
}).fail([=](const RPCError &error, mtpRequestId requestId) {
|
||||||
|
saveEditMsgFail(history, error, requestId);
|
||||||
|
}).send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryWidget::saveEditMsgDone(History *history, const MTPUpdates &updates, mtpRequestId req) {
|
void HistoryWidget::saveEditMsgDone(History *history, const MTPUpdates &updates, mtpRequestId req) {
|
||||||
|
@ -2913,7 +2971,9 @@ void HistoryWidget::saveEditMsgDone(History *history, const MTPUpdates &updates,
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HistoryWidget::saveEditMsgFail(History *history, const RPCError &error, mtpRequestId req) {
|
bool HistoryWidget::saveEditMsgFail(History *history, const RPCError &error, mtpRequestId req) {
|
||||||
if (MTP::isDefaultHandledError(error)) return false;
|
if (MTP::isDefaultHandledError(error)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (req == _saveEditMsgRequestId) {
|
if (req == _saveEditMsgRequestId) {
|
||||||
_saveEditMsgRequestId = 0;
|
_saveEditMsgRequestId = 0;
|
||||||
}
|
}
|
||||||
|
@ -3733,7 +3793,9 @@ void HistoryWidget::inlineBotResolveDone(
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HistoryWidget::inlineBotResolveFail(QString name, const RPCError &error) {
|
bool HistoryWidget::inlineBotResolveFail(QString name, const RPCError &error) {
|
||||||
if (MTP::isDefaultHandledError(error)) return false;
|
if (MTP::isDefaultHandledError(error)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
_inlineBotResolveRequestId = 0;
|
_inlineBotResolveRequestId = 0;
|
||||||
// Notify::inlineBotRequesting(false);
|
// Notify::inlineBotRequesting(false);
|
||||||
|
@ -6085,7 +6147,7 @@ void HistoryWidget::cancelEdit() {
|
||||||
applyDraft();
|
applyDraft();
|
||||||
|
|
||||||
if (_saveEditMsgRequestId) {
|
if (_saveEditMsgRequestId) {
|
||||||
MTP::cancel(_saveEditMsgRequestId);
|
_history->session().api().request(_saveEditMsgRequestId).cancel();
|
||||||
_saveEditMsgRequestId = 0;
|
_saveEditMsgRequestId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6970,5 +7032,6 @@ void HistoryWidget::synteticScrollToY(int y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
HistoryWidget::~HistoryWidget() {
|
HistoryWidget::~HistoryWidget() {
|
||||||
|
clearAllLoadRequests();
|
||||||
setTabbedPanel(nullptr);
|
setTabbedPanel(nullptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,6 @@ public:
|
||||||
|
|
||||||
void start();
|
void start();
|
||||||
|
|
||||||
void messagesReceived(PeerData *peer, const MTPmessages_Messages &messages, mtpRequestId requestId);
|
|
||||||
void historyLoaded();
|
void historyLoaded();
|
||||||
|
|
||||||
void windowShown();
|
void windowShown();
|
||||||
|
@ -569,7 +568,8 @@ private:
|
||||||
void checkPreview();
|
void checkPreview();
|
||||||
void requestPreview();
|
void requestPreview();
|
||||||
void gotPreview(QString links, const MTPMessageMedia &media, mtpRequestId req);
|
void gotPreview(QString links, const MTPMessageMedia &media, mtpRequestId req);
|
||||||
bool messagesFailed(const RPCError &error, mtpRequestId requestId);
|
void messagesReceived(PeerData *peer, const MTPmessages_Messages &messages, int requestId);
|
||||||
|
bool messagesFailed(const RPCError &error, int requestId);
|
||||||
void addMessagesToFront(PeerData *peer, const QVector<MTPMessage> &messages);
|
void addMessagesToFront(PeerData *peer, const QVector<MTPMessage> &messages);
|
||||||
void addMessagesToBack(PeerData *peer, const QVector<MTPMessage> &messages);
|
void addMessagesToBack(PeerData *peer, const QVector<MTPMessage> &messages);
|
||||||
|
|
||||||
|
@ -681,12 +681,12 @@ private:
|
||||||
bool _canSendMessages = false;
|
bool _canSendMessages = false;
|
||||||
MsgId _showAtMsgId = ShowAtUnreadMsgId;
|
MsgId _showAtMsgId = ShowAtUnreadMsgId;
|
||||||
|
|
||||||
mtpRequestId _firstLoadRequest = 0;
|
int _firstLoadRequest = 0; // Not real mtpRequestId.
|
||||||
mtpRequestId _preloadRequest = 0;
|
int _preloadRequest = 0; // Not real mtpRequestId.
|
||||||
mtpRequestId _preloadDownRequest = 0;
|
int _preloadDownRequest = 0; // Not real mtpRequestId.
|
||||||
|
|
||||||
MsgId _delayedShowAtMsgId = -1;
|
MsgId _delayedShowAtMsgId = -1;
|
||||||
mtpRequestId _delayedShowAtRequest = 0;
|
int _delayedShowAtRequest = 0; // Not real mtpRequestId.
|
||||||
|
|
||||||
object_ptr<HistoryView::TopBarWidget> _topBar;
|
object_ptr<HistoryView::TopBarWidget> _topBar;
|
||||||
object_ptr<Ui::ScrollArea> _scroll;
|
object_ptr<Ui::ScrollArea> _scroll;
|
||||||
|
|
Loading…
Reference in New Issue