mirror of https://github.com/procxx/kepka.git
Replaced Auth.lifetime() in buttons with internal lifetime.
This commit is contained in:
parent
9c60d2be80
commit
2b8e76a060
|
@ -71,6 +71,8 @@ NSImage *qt_mac_create_nsimage(const QPixmap &pm);
|
||||||
|
|
||||||
@implementation PinnedDialogButton : NSCustomTouchBarItem
|
@implementation PinnedDialogButton : NSCustomTouchBarItem
|
||||||
|
|
||||||
|
auto lifetime = rpl::lifetime();
|
||||||
|
|
||||||
- (id) init:(int)num {
|
- (id) init:(int)num {
|
||||||
if (num == kSavedMessagesId) {
|
if (num == kSavedMessagesId) {
|
||||||
return [self initSavedMessages];
|
return [self initSavedMessages];
|
||||||
|
@ -104,7 +106,7 @@ NSImage *qt_mac_create_nsimage(const QPixmap &pm);
|
||||||
) | rpl::start_with_next([=] {
|
) | rpl::start_with_next([=] {
|
||||||
self.waiting = true;
|
self.waiting = true;
|
||||||
updateImage();
|
updateImage();
|
||||||
}, Auth().lifetime());
|
}, lifetime);
|
||||||
|
|
||||||
base::ObservableViewer(
|
base::ObservableViewer(
|
||||||
Auth().downloaderTaskFinished()
|
Auth().downloaderTaskFinished()
|
||||||
|
@ -112,7 +114,7 @@ NSImage *qt_mac_create_nsimage(const QPixmap &pm);
|
||||||
if (self.waiting) {
|
if (self.waiting) {
|
||||||
updateImage();
|
updateImage();
|
||||||
}
|
}
|
||||||
}, Auth().lifetime());
|
}, lifetime);
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue