diff --git a/Telegram/SourceFiles/platform/mac/touchbar.h b/Telegram/SourceFiles/platform/mac/touchbar.h index e72a8f27f5..11f61db91e 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar.h +++ b/Telegram/SourceFiles/platform/mac/touchbar.h @@ -20,22 +20,7 @@ enum class TouchBarType { }; } // namespace -@interface TouchBar : NSTouchBar { - @private - NSView *_parentView; - NSMutableArray *_mainPinnedButtons; - - NSTouchBar *_touchBarMain; - NSTouchBar *_touchBarAudioPlayer; - - Platform::TouchBarType _touchBarType; - Platform::TouchBarType _touchBarTypeBeforeLock; - - double _duration; - double _position; - - rpl::lifetime _lifetime; -} +@interface TouchBar : NSTouchBar @property(retain) NSDictionary * _Nullable touchBarItems; diff --git a/Telegram/SourceFiles/platform/mac/touchbar.mm b/Telegram/SourceFiles/platform/mac/touchbar.mm index 9b028bee1f..79eb36a625 100644 --- a/Telegram/SourceFiles/platform/mac/touchbar.mm +++ b/Telegram/SourceFiles/platform/mac/touchbar.mm @@ -92,11 +92,7 @@ NSString *FormatTime(int time) { } // namespace -@interface PinnedDialogButton : NSCustomTouchBarItem { - rpl::lifetime _lifetime; - rpl::lifetime _userpicChangedLifetime; - bool isWaitingUserpicLoad; -} +@interface PinnedDialogButton : NSCustomTouchBarItem @property(nonatomic, assign) int number; @property(nonatomic, assign) PeerData *peer; @@ -109,7 +105,11 @@ NSString *FormatTime(int time) { @end // @interface PinnedDialogButton -@implementation PinnedDialogButton : NSCustomTouchBarItem +@implementation PinnedDialogButton { + rpl::lifetime _lifetime; + rpl::lifetime _userpicChangedLifetime; + bool isWaitingUserpicLoad; +} - (id) init:(int)num { if (num == kSavedMessagesId) { @@ -241,7 +241,21 @@ NSString *FormatTime(int time) { @interface TouchBar() @end // @interface TouchBar -@implementation TouchBar +@implementation TouchBar { + NSView *_parentView; + NSMutableArray *_mainPinnedButtons; + + NSTouchBar *_touchBarMain; + NSTouchBar *_touchBarAudioPlayer; + + Platform::TouchBarType _touchBarType; + Platform::TouchBarType _touchBarTypeBeforeLock; + + double _duration; + double _position; + + rpl::lifetime _lifetime; +} - (id) init:(NSView *)view { self = [super init];