Replaced Auth.lifetime() in buttons with internal lifetime.

This commit is contained in:
23rd 2019-05-02 10:59:15 +03:00 committed by John Preston
parent 9c60d2be80
commit 2b8e76a060
1 changed files with 4 additions and 2 deletions

View File

@ -71,6 +71,8 @@ NSImage *qt_mac_create_nsimage(const QPixmap &pm);
@implementation PinnedDialogButton : NSCustomTouchBarItem
auto lifetime = rpl::lifetime();
- (id) init:(int)num {
if (num == kSavedMessagesId) {
return [self initSavedMessages];
@ -104,7 +106,7 @@ NSImage *qt_mac_create_nsimage(const QPixmap &pm);
) | rpl::start_with_next([=] {
self.waiting = true;
updateImage();
}, Auth().lifetime());
}, lifetime);
base::ObservableViewer(
Auth().downloaderTaskFinished()
@ -112,7 +114,7 @@ NSImage *qt_mac_create_nsimage(const QPixmap &pm);
if (self.waiting) {
updateImage();
}
}, Auth().lifetime());
}, lifetime);
return self;
}