mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Added notifier of archiving pinned dialog to update touchbar.
This commit is contained in:
parent
26569683ca
commit
da6baeb1a7
1 changed files with 4 additions and 0 deletions
|
@ -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<MTPInputFolderPeer>(
|
||||
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue