From 71f6dd85c2d982149030b32d30c5793502983786 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 10 May 2019 10:03:47 +0300 Subject: [PATCH] Fixed showing empty button in touchbar when archive is not ready. --- Telegram/SourceFiles/platform/mac/touchbar.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Telegram/SourceFiles/platform/mac/touchbar.mm b/Telegram/SourceFiles/platform/mac/touchbar.mm index 6ca97eb856..e9f0f3d560 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar.mm @@ -378,6 +378,10 @@ NSImage *createImageFromStyleIcon(const style::icon &icon, int size = kIdealIcon for (auto i = kArchiveId; i <= Global::PinnedDialogsCountMax(); i++) { PinnedDialogButton *button = [[PinnedDialogButton alloc] init:i]; [self.mainPinnedButtons addObject:button]; + if (i == kArchiveId) { + button.isDeletedFromView = true; + continue; + } [stackView addView:button.view inGravity:NSStackViewGravityCenter]; }