2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Remove some more Auth() calls.

This commit is contained in:
John Preston
2019-08-06 17:40:08 +01:00
parent f48732f813
commit 4bad642190
36 changed files with 280 additions and 196 deletions

View File

@@ -144,7 +144,7 @@ private:
void resizeSearchControls();
void scrollByWheelEvent(not_null<QWheelEvent*> e);
not_null<StickersListWidget*> _pan;
const not_null<StickersListWidget*> _pan;
static constexpr auto kVisibleIconsCount = 8;
@@ -501,9 +501,11 @@ void StickersListWidget::Footer::mousePressEvent(QMouseEvent *e) {
updateSelected();
if (_iconOver == SpecialOver::Settings) {
Ui::show(Box<StickersBox>(hasOnlyFeaturedSets()
? StickersBox::Section::Featured
: StickersBox::Section::Installed));
Ui::show(Box<StickersBox>(
&_pan->controller()->session(),
(hasOnlyFeaturedSets()
? StickersBox::Section::Featured
: StickersBox::Section::Installed)));
} else if (_iconOver == SpecialOver::Search) {
toggleSearch(true);
} else {
@@ -833,8 +835,10 @@ StickersListWidget::StickersListWidget(
setMouseTracking(true);
setAttribute(Qt::WA_OpaquePaintEvent);
_settings->addClickHandler([] {
Ui::show(Box<StickersBox>(StickersBox::Section::Installed));
_settings->addClickHandler([=] {
Ui::show(Box<StickersBox>(
&controller->session(),
StickersBox::Section::Installed));
});
subscribe(session().downloaderTaskFinished(), [=] {