mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 23:55:12 +00:00
Updated TDesktop sources to 2.2
This commit is contained in:
@@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "window/window_session_controller.h"
|
||||
#include "window/window_slide_animation.h"
|
||||
#include "window/window_connecting_widget.h"
|
||||
#include "window/window_main_menu.h"
|
||||
#include "storage/storage_media_prepare.h"
|
||||
#include "storage/storage_account.h"
|
||||
#include "data/data_session.h"
|
||||
@@ -275,17 +276,9 @@ Widget::Widget(
|
||||
Core::App().lockByPasscode();
|
||||
_lockUnlock->setIconOverride(nullptr);
|
||||
});
|
||||
rpl::single(
|
||||
rpl::empty_value()
|
||||
) | rpl::then(
|
||||
controller->filtersMenuChanged()
|
||||
) | rpl::start_with_next([=] {
|
||||
const auto filtersHidden = !controller->filtersWidth();
|
||||
_mainMenuToggle->setVisible(filtersHidden);
|
||||
_searchForNarrowFilters->setVisible(!filtersHidden);
|
||||
updateControlsGeometry();
|
||||
}, lifetime());
|
||||
_mainMenuToggle->setClickedCallback([=] { showMainMenu(); });
|
||||
|
||||
setupMainMenuToggle();
|
||||
|
||||
_searchForNarrowFilters->setClickedCallback([=] { Ui::showChatsList(&session()); });
|
||||
|
||||
_chooseByDragTimer.setSingleShot(true);
|
||||
@@ -427,6 +420,31 @@ void Widget::setupSupportMode() {
|
||||
) | rpl::to_empty);
|
||||
}
|
||||
|
||||
void Widget::setupMainMenuToggle() {
|
||||
_mainMenuToggle->setClickedCallback([=] { showMainMenu(); });
|
||||
|
||||
rpl::single(
|
||||
rpl::empty_value()
|
||||
) | rpl::then(
|
||||
controller()->filtersMenuChanged()
|
||||
) | rpl::start_with_next([=] {
|
||||
const auto filtersHidden = !controller()->filtersWidth();
|
||||
_mainMenuToggle->setVisible(filtersHidden);
|
||||
_searchForNarrowFilters->setVisible(!filtersHidden);
|
||||
updateControlsGeometry();
|
||||
}, lifetime());
|
||||
|
||||
Window::OtherAccountsUnreadState(
|
||||
) | rpl::start_with_next([=](const Window::OthersUnreadState &state) {
|
||||
const auto icon = !state.count
|
||||
? nullptr
|
||||
: !state.allMuted
|
||||
? &st::dialogsMenuToggleUnread
|
||||
: &st::dialogsMenuToggleUnreadMuted;
|
||||
_mainMenuToggle->setIconOverride(icon, icon);
|
||||
}, _mainMenuToggle->lifetime());
|
||||
}
|
||||
|
||||
void Widget::fullSearchRefreshOn(rpl::producer<> events) {
|
||||
std::move(
|
||||
events
|
||||
|
Reference in New Issue
Block a user