2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

Return not_null<History*> in App::history().

This commit is contained in:
John Preston
2017-08-31 20:53:03 +03:00
parent 5a20014b1a
commit 48e2a5472e
13 changed files with 44 additions and 22 deletions

View File

@@ -267,7 +267,7 @@ void MainWindow::setupIntro() {
void MainWindow::serviceNotification(const TextWithEntities &message, const MTPMessageMedia &media, int32 date, bool force) {
if (date <= 0) date = unixtime();
auto h = (_main && App::userLoaded(ServiceUserId)) ? App::history(ServiceUserId) : nullptr;
auto h = (_main && App::userLoaded(ServiceUserId)) ? App::history(ServiceUserId).get() : nullptr;
if (!h || (!force && h->isEmpty())) {
_delayedServiceMsgs.push_back(DelayedServiceMsg(message, media, date));
return sendServiceHistoryRequest();