Fixed showing empty button in touchbar when archive is not ready.

This commit is contained in:
23rd 2019-05-10 10:03:47 +03:00 committed by John Preston
parent abd55679af
commit 71f6dd85c2
1 changed files with 4 additions and 0 deletions

View File

@ -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];
}