From f8dca0ae8820ac93c6badb03aa431b24c5ce605b Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 26 Jun 2020 15:55:34 +0300 Subject: [PATCH] Fixed couple of issues with passcode lock support in touchbar. --- Telegram/SourceFiles/platform/mac/mac_touchbar.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/platform/mac/mac_touchbar.mm b/Telegram/SourceFiles/platform/mac/mac_touchbar.mm index ca24974a97..f29efaa95d 100644 --- a/Telegram/SourceFiles/platform/mac/mac_touchbar.mm +++ b/Telegram/SourceFiles/platform/mac/mac_touchbar.mm @@ -1505,6 +1505,7 @@ void AppendEmojiPacks( [self createTouchBar]; [self setTouchBar:Platform::TouchBarType::Main]; + _touchBarTypeBeforeLock = Platform::TouchBarType::Main; Media::Player::instance()->playerWidgetToggled( ) | rpl::start_with_next([=](bool toggled) { @@ -1770,7 +1771,9 @@ void AppendEmojiPacks( - (void) handleTrackStateChange:(Media::Player::TrackState)state { if (state.id.type() == kSongType) { - [self setTouchBar:Platform::TouchBarType::AudioPlayerForce]; + if (_touchBarType != Platform::TouchBarType::None) { + [self setTouchBar:Platform::TouchBarType::AudioPlayerForce]; + } } else { return; }