2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Use internal section stack in Info::WrapWidget.

This commit is contained in:
John Preston
2017-10-03 14:05:58 +01:00
parent 525cde3498
commit 93c15e5ee6
63 changed files with 736 additions and 429 deletions

View File

@@ -24,17 +24,18 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "dialogs/dialogs_search_from_controllers.h"
#include "styles/style_dialogs.h"
#include "ui/widgets/buttons.h"
#include "ui/widgets/input_fields.h"
#include "ui/wrap/fade_wrap.h"
#include "lang/lang_keys.h"
#include "application.h"
#include "mainwindow.h"
#include "mainwidget.h"
#include "ui/widgets/input_fields.h"
#include "autoupdater.h"
#include "auth_session.h"
#include "messenger.h"
#include "boxes/peer_list_box.h"
#include "window/window_controller.h"
#include "window/window_slide_animation.h"
#include "profile/profile_channel_controllers.h"
namespace {
@@ -873,12 +874,20 @@ void DialogsWidget::clearSearchCache() {
}
void DialogsWidget::showSearchFrom() {
if (!_searchInPeer) {
return;
}
auto peer = _searchInPeer;
Dialogs::ShowSearchFromBox(peer, base::lambda_guarded(this, [this, peer](not_null<UserData*> user) {
Ui::hideLayer();
setSearchInPeer(peer, user);
onFilterUpdate(true);
}), base::lambda_guarded(this, [this] { _filter->setFocus(); }));
Dialogs::ShowSearchFromBox(
controller(),
peer,
base::lambda_guarded(this, [this, peer](
not_null<UserData*> user) {
Ui::hideLayer();
setSearchInPeer(peer, user);
onFilterUpdate(true);
}),
base::lambda_guarded(this, [this] { _filter->setFocus(); }));
}
void DialogsWidget::onFilterCursorMoved(int from, int to) {