From 0f00d90c2939d4f8f17f808ffecb058f36032054 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sat, 5 Mar 2022 17:43:49 +0300 Subject: [PATCH] Removed unused argument when pin animation in touchbar is cancelled. --- .../platform/mac/touchbar/items/mac_pinned_chats_item.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm index f8fe0c7ee2..ede7a58f96 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar/items/mac_pinned_chats_item.mm @@ -264,7 +264,7 @@ TimeId CalculateOnlineTill(not_null peer) { }); }; - const auto cancelCurrentByIndex = [=](int index) { + const auto cancelCurrentPeer = [=] { Expects(*currentPeer != nullptr); if (*currentState == State::Started) { @@ -278,7 +278,7 @@ TimeId CalculateOnlineTill(not_null peer) { const auto cancelCurrent = [=] { if (*currentPeer) { - cancelCurrentByIndex(indexOf(*currentPeer)); + cancelCurrentPeer(); } }; @@ -356,7 +356,7 @@ TimeId CalculateOnlineTill(not_null peer) { const auto index = indexOf(*currentPeer); if (*currentDesiredIndex == index || *currentState != State::Started) { - cancelCurrentByIndex(index); + cancelCurrentPeer(); return; } const auto result = *currentDesiredIndex;