From 517358c8e9a1c172d44bdfefcfef23ce28db861a Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 15 Feb 2016 14:11:07 +0300 Subject: [PATCH] clearing media autodownload settings on logout, fixed history clearing --- Telegram/SourceFiles/app.cpp | 3 +++ Telegram/SourceFiles/mainwidget.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index 67ad44426..2915f02ac 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -1842,6 +1842,9 @@ namespace App { cSetSavedGifs(SavedGifs()); cSetLastSavedGifsUpdate(0); cSetReportSpamStatuses(ReportSpamStatuses()); + cSetAutoDownloadPhoto(0); + cSetAutoDownloadAudio(0); + cSetAutoDownloadGif(0); ::photoItems.clear(); ::documentItems.clear(); ::webPageItems.clear(); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index c632b510d..8944d59f3 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -994,7 +994,7 @@ void MainWidget::deleteHistoryPart(PeerData *peer, const MTPmessages_AffectedHis return; } - MTP::send(MTPmessages_DeleteHistory(peer->input, d.voffset), rpcDone(&MainWidget::deleteHistoryPart, peer)); + MTP::send(MTPmessages_DeleteHistory(peer->input, MTP_int(0)), rpcDone(&MainWidget::deleteHistoryPart, peer)); } void MainWidget::deleteMessages(PeerData *peer, const QVector &ids) {