From da6baeb1a7dd535c459161f1ddc4078258085ab0 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 26 Jun 2019 20:25:11 +0300 Subject: [PATCH] Added notifier of archiving pinned dialog to update touchbar. --- Telegram/SourceFiles/apiwrap.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index 50e8281312..090488ae72 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -507,6 +507,7 @@ void ApiWrap::toggleHistoryArchived( if (const auto already = _historyArchivedRequests.take(history)) { request(already->first).cancel(); } + const auto isPinned = history->isPinnedDialog(); const auto archiveId = Data::Folder::kId; const auto requestId = request(MTPfolders_EditPeerFolders( MTP_vector( @@ -524,6 +525,9 @@ void ApiWrap::toggleHistoryArchived( if (const auto data = _historyArchivedRequests.take(history)) { data->second(); } + if (isPinned) { + _session->data().notifyPinnedDialogsOrderUpdated(); + } }).fail([=](const RPCError &error) { _historyArchivedRequests.remove(history); }).send();