2017-09-25 16:06:53 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 10:23:14 +00:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2017-09-25 16:06:53 +00:00
|
|
|
|
2018-01-03 10:23:14 +00:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2017-09-25 16:06:53 +00:00
|
|
|
*/
|
|
|
|
#include "info/profile/info_profile_members.h"
|
|
|
|
|
|
|
|
#include <rpl/combine.h>
|
2017-10-24 17:11:35 +00:00
|
|
|
#include "info/profile/info_profile_widget.h"
|
2017-09-25 16:06:53 +00:00
|
|
|
#include "info/profile/info_profile_values.h"
|
|
|
|
#include "info/profile/info_profile_icon.h"
|
|
|
|
#include "info/profile/info_profile_values.h"
|
2017-09-26 17:57:01 +00:00
|
|
|
#include "info/profile/info_profile_members_controllers.h"
|
2017-11-28 16:20:05 +00:00
|
|
|
#include "info/members/info_members_widget.h"
|
2017-09-30 18:26:45 +00:00
|
|
|
#include "info/info_content_widget.h"
|
2017-10-31 18:25:22 +00:00
|
|
|
#include "info/info_controller.h"
|
2017-11-17 13:23:36 +00:00
|
|
|
#include "info/info_memento.h"
|
2017-09-25 16:06:53 +00:00
|
|
|
#include "ui/widgets/labels.h"
|
|
|
|
#include "ui/widgets/buttons.h"
|
|
|
|
#include "ui/widgets/input_fields.h"
|
2017-09-26 17:57:01 +00:00
|
|
|
#include "ui/widgets/scroll_area.h"
|
2017-11-17 13:23:36 +00:00
|
|
|
#include "ui/wrap/padding_wrap.h"
|
2019-06-17 16:59:43 +00:00
|
|
|
#include "ui/text/text_utilities.h" // Ui::Text::ToUpper
|
2017-11-17 13:23:36 +00:00
|
|
|
#include "ui/search_field_controller.h"
|
2017-09-25 16:06:53 +00:00
|
|
|
#include "lang/lang_keys.h"
|
|
|
|
#include "boxes/confirm_box.h"
|
2019-01-10 06:26:08 +00:00
|
|
|
#include "boxes/peers/add_participants_box.h"
|
2019-06-06 10:21:40 +00:00
|
|
|
#include "window/window_session_controller.h"
|
2019-01-04 11:09:48 +00:00
|
|
|
#include "data/data_channel.h"
|
|
|
|
#include "data/data_chat.h"
|
|
|
|
#include "data/data_user.h"
|
|
|
|
#include "styles/style_boxes.h"
|
|
|
|
#include "styles/style_info.h"
|
2017-09-25 16:06:53 +00:00
|
|
|
|
|
|
|
namespace Info {
|
|
|
|
namespace Profile {
|
|
|
|
namespace {
|
|
|
|
|
2017-11-17 17:02:49 +00:00
|
|
|
constexpr auto kEnableSearchMembersAfterCount = 20;
|
2017-09-25 16:06:53 +00:00
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
Members::Members(
|
|
|
|
QWidget *parent,
|
2018-01-22 19:51:38 +00:00
|
|
|
not_null<Controller*> controller)
|
2017-09-25 16:06:53 +00:00
|
|
|
: RpWidget(parent)
|
2017-11-17 13:23:36 +00:00
|
|
|
, _controller(controller)
|
2018-01-22 19:51:38 +00:00
|
|
|
, _peer(_controller->key().peer())
|
2017-12-04 07:33:33 +00:00
|
|
|
, _listController(CreateMembersController(controller, _peer)) {
|
2017-11-17 13:23:36 +00:00
|
|
|
setupHeader();
|
|
|
|
setupList();
|
2017-09-26 17:57:01 +00:00
|
|
|
setContent(_list.data());
|
2017-10-03 13:05:58 +00:00
|
|
|
_listController->setDelegate(static_cast<PeerListDelegate*>(this));
|
2017-11-17 13:23:36 +00:00
|
|
|
|
2017-12-22 07:05:20 +00:00
|
|
|
_controller->searchFieldController()->queryValue(
|
|
|
|
) | rpl::start_with_next([this](QString &&query) {
|
|
|
|
peerListScrollToTop();
|
|
|
|
content()->searchQueryChanged(std::move(query));
|
|
|
|
}, lifetime());
|
|
|
|
MembersCountValue(
|
|
|
|
_peer
|
|
|
|
) | rpl::start_with_next([this](int count) {
|
|
|
|
const auto enabled = (count >= kEnableSearchMembersAfterCount);
|
|
|
|
_controller->setSearchEnabledByContent(enabled);
|
|
|
|
}, lifetime());
|
2017-09-26 17:57:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int Members::desiredHeight() const {
|
2017-11-17 13:23:36 +00:00
|
|
|
auto desired = _header ? _header->height() : 0;
|
2017-09-26 17:57:01 +00:00
|
|
|
auto count = [this] {
|
|
|
|
if (auto chat = _peer->asChat()) {
|
|
|
|
return chat->count;
|
|
|
|
} else if (auto channel = _peer->asChannel()) {
|
|
|
|
return channel->membersCount();
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}();
|
|
|
|
desired += qMax(count, _list->fullRowsCount())
|
|
|
|
* st::infoMembersList.item.height;
|
|
|
|
return qMax(height(), desired);
|
2017-09-25 16:06:53 +00:00
|
|
|
}
|
|
|
|
|
2017-10-22 12:07:57 +00:00
|
|
|
rpl::producer<int> Members::onlineCountValue() const {
|
|
|
|
return _listController->onlineCountValue();
|
|
|
|
}
|
|
|
|
|
2017-11-21 09:20:56 +00:00
|
|
|
rpl::producer<Ui::ScrollToRequest> Members::scrollToRequests() const {
|
|
|
|
return _scrollToRequests.events();
|
|
|
|
}
|
|
|
|
|
2017-11-17 13:23:36 +00:00
|
|
|
std::unique_ptr<MembersState> Members::saveState() {
|
|
|
|
auto result = std::make_unique<MembersState>();
|
|
|
|
result->list = _listController->saveState();
|
|
|
|
//if (_searchShown) {
|
|
|
|
// result->search = _searchField->getLastText();
|
|
|
|
//}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Members::restoreState(std::unique_ptr<MembersState> state) {
|
|
|
|
if (!state) {
|
|
|
|
return;
|
2017-10-24 17:11:35 +00:00
|
|
|
}
|
2017-11-17 13:23:36 +00:00
|
|
|
_listController->restoreState(std::move(state->list));
|
2017-12-08 08:14:30 +00:00
|
|
|
//updateSearchEnabledByContent();
|
2017-11-17 13:23:36 +00:00
|
|
|
//if (!_controller->searchFieldController()->query().isEmpty()) {
|
|
|
|
// if (!_searchShown) {
|
|
|
|
// toggleSearch(anim::type::instant);
|
|
|
|
// }
|
|
|
|
//} else if (_searchShown) {
|
|
|
|
// toggleSearch(anim::type::instant);
|
|
|
|
//}
|
2017-10-24 17:11:35 +00:00
|
|
|
}
|
|
|
|
|
2017-11-17 13:23:36 +00:00
|
|
|
void Members::setupHeader() {
|
|
|
|
if (_controller->section().type() == Section::Type::Members) {
|
|
|
|
return;
|
2017-10-24 17:11:35 +00:00
|
|
|
}
|
2017-11-17 13:23:36 +00:00
|
|
|
_header = object_ptr<Ui::FixedHeightWidget>(
|
|
|
|
this,
|
|
|
|
st::infoMembersHeader);
|
|
|
|
auto parent = _header.data();
|
|
|
|
|
2019-11-02 17:06:47 +00:00
|
|
|
_openMembers = Ui::CreateChild<Ui::SettingsButton>(
|
2017-11-17 15:34:51 +00:00
|
|
|
parent,
|
|
|
|
rpl::single(QString()));
|
|
|
|
|
2017-11-17 13:23:36 +00:00
|
|
|
object_ptr<FloatingIcon>(
|
|
|
|
parent,
|
|
|
|
st::infoIconMembers,
|
|
|
|
st::infoIconPosition);
|
|
|
|
|
|
|
|
_titleWrap = Ui::CreateChild<Ui::RpWidget>(parent);
|
|
|
|
_title = setupTitle();
|
|
|
|
_addMember = Ui::CreateChild<Ui::IconButton>(
|
2017-11-17 15:34:51 +00:00
|
|
|
_openMembers,
|
2017-11-17 13:23:36 +00:00
|
|
|
st::infoMembersAddMember);
|
|
|
|
//_searchField = _controller->searchFieldController()->createField(
|
|
|
|
// parent,
|
|
|
|
// st::infoMembersSearchField);
|
2017-12-08 08:14:30 +00:00
|
|
|
_search = Ui::CreateChild<Ui::IconButton>(
|
|
|
|
_openMembers,
|
|
|
|
st::infoMembersSearch);
|
2017-11-17 13:23:36 +00:00
|
|
|
//_cancelSearch = Ui::CreateChild<Ui::CrossButton>(
|
|
|
|
// parent,
|
|
|
|
// st::infoMembersCancelSearch);
|
|
|
|
|
|
|
|
setupButtons();
|
|
|
|
|
2017-12-22 07:05:20 +00:00
|
|
|
//_controller->wrapValue(
|
|
|
|
//) | rpl::start_with_next([this](Wrap wrap) {
|
|
|
|
// _wrap = wrap;
|
|
|
|
// updateSearchOverrides();
|
|
|
|
//}, lifetime());
|
|
|
|
widthValue(
|
|
|
|
) | rpl::start_with_next([this](int width) {
|
|
|
|
_header->resizeToWidth(width);
|
|
|
|
}, _header->lifetime());
|
2017-10-24 17:11:35 +00:00
|
|
|
}
|
|
|
|
|
2017-11-17 13:23:36 +00:00
|
|
|
object_ptr<Ui::FlatLabel> Members::setupTitle() {
|
2017-09-25 16:06:53 +00:00
|
|
|
auto result = object_ptr<Ui::FlatLabel>(
|
2017-11-17 13:23:36 +00:00
|
|
|
_titleWrap,
|
2019-06-19 16:39:25 +00:00
|
|
|
tr::lng_chat_status_members(
|
|
|
|
lt_count_decimal,
|
|
|
|
MembersCountValue(_peer) | tr::to_count(),
|
|
|
|
Ui::Text::Upper
|
|
|
|
),
|
2017-09-25 16:06:53 +00:00
|
|
|
st::infoBlockHeaderLabel);
|
|
|
|
result->setAttribute(Qt::WA_TransparentForMouseEvents);
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Members::setupButtons() {
|
|
|
|
using namespace rpl::mappers;
|
|
|
|
|
2017-11-17 13:23:36 +00:00
|
|
|
_openMembers->addClickHandler([this] {
|
2017-12-08 08:14:30 +00:00
|
|
|
showMembersWithSearch(false);
|
2017-11-17 13:23:36 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
//_searchField->hide();
|
2017-11-27 11:43:57 +00:00
|
|
|
//_cancelSearch->setVisible(false);
|
2017-09-25 16:06:53 +00:00
|
|
|
|
|
|
|
auto addMemberShown = CanAddMemberValue(_peer)
|
|
|
|
| rpl::start_spawning(lifetime());
|
|
|
|
_addMember->showOn(rpl::duplicate(addMemberShown));
|
2017-10-03 14:57:11 +00:00
|
|
|
_addMember->addClickHandler([this] { // TODO throttle(ripple duration)
|
|
|
|
this->addMember();
|
|
|
|
});
|
2017-09-25 16:06:53 +00:00
|
|
|
|
2017-12-08 08:14:30 +00:00
|
|
|
auto searchShown = MembersCountValue(_peer)
|
|
|
|
| rpl::map(_1 >= kEnableSearchMembersAfterCount)
|
|
|
|
| rpl::distinct_until_changed()
|
|
|
|
| rpl::start_spawning(lifetime());
|
|
|
|
_search->showOn(rpl::duplicate(searchShown));
|
|
|
|
_search->addClickHandler([this] { // TODO throttle(ripple duration)
|
|
|
|
this->showMembersWithSearch(true);
|
|
|
|
});
|
2017-11-17 13:23:36 +00:00
|
|
|
//_cancelSearch->addClickHandler([this] {
|
|
|
|
// this->cancelSearch();
|
|
|
|
//});
|
|
|
|
|
2017-12-08 08:14:30 +00:00
|
|
|
rpl::combine(
|
|
|
|
std::move(addMemberShown),
|
2017-12-22 07:05:20 +00:00
|
|
|
std::move(searchShown)
|
|
|
|
) | rpl::start_with_next([this] {
|
|
|
|
updateHeaderControlsGeometry(width());
|
|
|
|
}, lifetime());
|
2017-09-25 16:06:53 +00:00
|
|
|
}
|
|
|
|
|
2017-11-17 13:23:36 +00:00
|
|
|
void Members::setupList() {
|
|
|
|
auto topSkip = _header ? _header->height() : 0;
|
|
|
|
_list = object_ptr<ListWidget>(
|
|
|
|
this,
|
|
|
|
_listController.get(),
|
2017-09-26 17:57:01 +00:00
|
|
|
st::infoMembersList);
|
2017-12-22 07:05:20 +00:00
|
|
|
_list->scrollToRequests(
|
|
|
|
) | rpl::start_with_next([this](Ui::ScrollToRequest request) {
|
|
|
|
auto addmin = (request.ymin < 0 || !_header)
|
|
|
|
? 0
|
|
|
|
: _header->height();
|
|
|
|
auto addmax = (request.ymax < 0 || !_header)
|
|
|
|
? 0
|
|
|
|
: _header->height();
|
|
|
|
_scrollToRequests.fire({
|
|
|
|
request.ymin + addmin,
|
|
|
|
request.ymax + addmax });
|
|
|
|
}, _list->lifetime());
|
|
|
|
widthValue(
|
|
|
|
) | rpl::start_with_next([this](int newWidth) {
|
|
|
|
_list->resizeToWidth(newWidth);
|
|
|
|
}, _list->lifetime());
|
|
|
|
_list->heightValue(
|
|
|
|
) | rpl::start_with_next([=](int listHeight) {
|
|
|
|
auto newHeight = (listHeight > st::membersMarginBottom)
|
|
|
|
? (topSkip
|
|
|
|
+ listHeight
|
|
|
|
+ st::membersMarginBottom)
|
|
|
|
: 0;
|
|
|
|
resize(width(), newHeight);
|
|
|
|
}, _list->lifetime());
|
2017-11-17 13:23:36 +00:00
|
|
|
_list->moveToLeft(0, topSkip);
|
2017-09-25 16:06:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int Members::resizeGetHeight(int newWidth) {
|
2017-11-17 13:23:36 +00:00
|
|
|
if (_header) {
|
|
|
|
updateHeaderControlsGeometry(newWidth);
|
|
|
|
}
|
|
|
|
return heightNoMargins();
|
|
|
|
}
|
|
|
|
|
2017-12-08 08:14:30 +00:00
|
|
|
//void Members::updateSearchEnabledByContent() {
|
|
|
|
// _controller->setSearchEnabledByContent(
|
|
|
|
// peerListFullRowsCount() >= kEnableSearchMembersAfterCount);
|
|
|
|
//}
|
2017-11-17 13:23:36 +00:00
|
|
|
|
|
|
|
void Members::updateHeaderControlsGeometry(int newWidth) {
|
2017-11-17 15:34:51 +00:00
|
|
|
_openMembers->setGeometry(0, st::infoProfileSkip, newWidth, st::infoMembersHeader - st::infoProfileSkip - st::infoMembersHeaderPaddingBottom);
|
2017-11-17 13:23:36 +00:00
|
|
|
|
2017-09-25 16:06:53 +00:00
|
|
|
auto availableWidth = newWidth
|
|
|
|
- st::infoMembersButtonPosition.x();
|
|
|
|
|
2017-11-17 13:23:36 +00:00
|
|
|
//auto cancelLeft = availableWidth - _cancelSearch->width();
|
|
|
|
//_cancelSearch->moveToLeft(
|
|
|
|
// cancelLeft,
|
|
|
|
// st::infoMembersButtonPosition.y());
|
|
|
|
|
|
|
|
//auto searchShownLeft = st::infoIconPosition.x()
|
|
|
|
// - st::infoMembersSearch.iconPosition.x();
|
|
|
|
//auto searchHiddenLeft = availableWidth - _search->width();
|
2019-04-02 09:13:30 +00:00
|
|
|
//auto searchShown = _searchShownAnimation.value(_searchShown ? 1. : 0.);
|
2017-11-17 13:23:36 +00:00
|
|
|
//auto searchCurrentLeft = anim::interpolate(
|
|
|
|
// searchHiddenLeft,
|
|
|
|
// searchShownLeft,
|
|
|
|
// searchShown);
|
|
|
|
//_search->moveToLeft(
|
|
|
|
// searchCurrentLeft,
|
|
|
|
// st::infoMembersButtonPosition.y());
|
|
|
|
|
|
|
|
//if (!_search->isHidden()) {
|
|
|
|
// availableWidth -= st::infoMembersSearch.width;
|
|
|
|
//}
|
2017-11-06 09:09:52 +00:00
|
|
|
_addMember->moveToLeft(
|
|
|
|
availableWidth - _addMember->width(),
|
|
|
|
st::infoMembersButtonPosition.y(),
|
|
|
|
newWidth);
|
2017-12-08 08:14:30 +00:00
|
|
|
if (!_addMember->isHidden()) {
|
|
|
|
availableWidth -= st::infoMembersSearch.width;
|
|
|
|
}
|
|
|
|
_search->moveToLeft(
|
|
|
|
availableWidth - _search->width(),
|
|
|
|
st::infoMembersButtonPosition.y(),
|
|
|
|
newWidth);
|
2017-11-06 09:09:52 +00:00
|
|
|
|
2017-11-17 13:23:36 +00:00
|
|
|
//auto fieldLeft = anim::interpolate(
|
|
|
|
// cancelLeft,
|
|
|
|
// st::infoBlockHeaderPosition.x(),
|
|
|
|
// searchShown);
|
|
|
|
//_searchField->setGeometryToLeft(
|
|
|
|
// fieldLeft,
|
|
|
|
// st::infoMembersSearchTop,
|
|
|
|
// cancelLeft - fieldLeft,
|
|
|
|
// _searchField->height());
|
|
|
|
|
|
|
|
//_titleWrap->resize(
|
|
|
|
// searchCurrentLeft - st::infoBlockHeaderPosition.x(),
|
|
|
|
// _title->height());
|
|
|
|
_titleWrap->resize(
|
|
|
|
availableWidth - _addMember->width() - st::infoBlockHeaderPosition.x(),
|
|
|
|
_title->height());
|
|
|
|
_titleWrap->moveToLeft(
|
2017-09-25 16:06:53 +00:00
|
|
|
st::infoBlockHeaderPosition.x(),
|
|
|
|
st::infoBlockHeaderPosition.y(),
|
|
|
|
newWidth);
|
2017-11-17 13:23:36 +00:00
|
|
|
_titleWrap->setAttribute(Qt::WA_TransparentForMouseEvents);
|
2017-09-25 16:06:53 +00:00
|
|
|
|
2017-11-17 13:23:36 +00:00
|
|
|
//_title->resizeToWidth(searchHiddenLeft);
|
|
|
|
_title->resizeToWidth(_titleWrap->width());
|
|
|
|
_title->moveToLeft(0, 0);
|
2017-09-25 16:06:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Members::addMember() {
|
2017-12-08 14:25:29 +00:00
|
|
|
if (const auto chat = _peer->asChat()) {
|
2019-07-25 18:55:11 +00:00
|
|
|
AddParticipantsBoxController::Start(_controller, chat);
|
2017-12-08 14:25:29 +00:00
|
|
|
} else if (const auto channel = _peer->asChannel()) {
|
|
|
|
const auto state = _listController->saveState();
|
|
|
|
const auto users = ranges::view::all(
|
|
|
|
state->list
|
|
|
|
) | ranges::view::transform([](not_null<PeerData*> peer) {
|
|
|
|
return peer->asUser();
|
2017-12-09 16:01:40 +00:00
|
|
|
}) | ranges::to_vector;
|
2017-12-08 14:25:29 +00:00
|
|
|
AddParticipantsBoxController::Start(
|
2019-07-25 18:55:11 +00:00
|
|
|
_controller,
|
2017-12-08 14:25:29 +00:00
|
|
|
channel,
|
|
|
|
{ users.begin(), users.end() });
|
2017-09-25 16:06:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-08 08:14:30 +00:00
|
|
|
void Members::showMembersWithSearch(bool withSearch) {
|
|
|
|
//if (!_searchShown) {
|
|
|
|
// toggleSearch();
|
|
|
|
//}
|
|
|
|
auto contentMemento = std::make_unique<Info::Members::Memento>(
|
|
|
|
_controller);
|
|
|
|
contentMemento->setState(saveState());
|
|
|
|
contentMemento->setSearchStartsFocused(withSearch);
|
|
|
|
auto mementoStack = std::vector<std::unique_ptr<ContentMemento>>();
|
|
|
|
mementoStack.push_back(std::move(contentMemento));
|
|
|
|
_controller->showSection(
|
|
|
|
Info::Memento(std::move(mementoStack)));
|
|
|
|
}
|
|
|
|
|
2017-11-17 13:23:36 +00:00
|
|
|
//void Members::toggleSearch(anim::type animated) {
|
|
|
|
// _searchShown = !_searchShown;
|
2017-11-27 11:43:57 +00:00
|
|
|
// _cancelSearch->toggle(_searchShown, animated);
|
2017-11-17 13:23:36 +00:00
|
|
|
// if (animated == anim::type::normal) {
|
|
|
|
// _searchShownAnimation.start(
|
|
|
|
// [this] { searchAnimationCallback(); },
|
|
|
|
// _searchShown ? 0. : 1.,
|
|
|
|
// _searchShown ? 1. : 0.,
|
|
|
|
// st::slideWrapDuration);
|
|
|
|
// } else {
|
|
|
|
// _searchShownAnimation.finish();
|
|
|
|
// searchAnimationCallback();
|
|
|
|
// }
|
|
|
|
// _search->setDisabled(_searchShown);
|
|
|
|
// if (_searchShown) {
|
|
|
|
// _searchField->show();
|
|
|
|
// _searchField->setFocus();
|
|
|
|
// } else {
|
|
|
|
// setFocus();
|
|
|
|
// }
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//void Members::searchAnimationCallback() {
|
|
|
|
// if (!_searchShownAnimation.animating()) {
|
|
|
|
// _searchField->setVisible(_searchShown);
|
|
|
|
// updateSearchOverrides();
|
|
|
|
// _search->setPointerCursor(!_searchShown);
|
|
|
|
// }
|
|
|
|
// updateHeaderControlsGeometry(width());
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//void Members::updateSearchOverrides() {
|
|
|
|
// auto iconOverride = !_searchShown
|
|
|
|
// ? nullptr
|
|
|
|
// : (_wrap == Wrap::Layer)
|
|
|
|
// ? &st::infoMembersSearchActiveLayer
|
|
|
|
// : &st::infoMembersSearchActive;
|
|
|
|
// _search->setIconOverride(iconOverride, iconOverride);
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//void Members::cancelSearch() {
|
|
|
|
// if (_searchShown) {
|
|
|
|
// if (!_searchField->getLastText().isEmpty()) {
|
|
|
|
// _searchField->setText(QString());
|
|
|
|
// _searchField->setFocus();
|
|
|
|
// } else {
|
|
|
|
// toggleSearch();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//}
|
2017-09-25 16:06:53 +00:00
|
|
|
|
|
|
|
void Members::visibleTopBottomUpdated(
|
|
|
|
int visibleTop,
|
|
|
|
int visibleBottom) {
|
|
|
|
setChildVisibleTopBottom(_list, visibleTop, visibleBottom);
|
|
|
|
}
|
|
|
|
|
2019-06-18 15:00:55 +00:00
|
|
|
void Members::peerListSetTitle(rpl::producer<QString> title) {
|
2017-09-26 17:57:01 +00:00
|
|
|
}
|
|
|
|
|
2019-06-18 16:53:27 +00:00
|
|
|
void Members::peerListSetAdditionalTitle(rpl::producer<QString> title) {
|
2017-09-26 17:57:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool Members::peerListIsRowSelected(not_null<PeerData*> peer) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
int Members::peerListSelectedRowsCount() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<not_null<PeerData*>> Members::peerListCollectSelectedRows() {
|
|
|
|
return {};
|
|
|
|
}
|
|
|
|
|
|
|
|
void Members::peerListScrollToTop() {
|
|
|
|
_scrollToRequests.fire({ -1, -1 });
|
|
|
|
}
|
|
|
|
|
|
|
|
void Members::peerListAddSelectedRowInBunch(not_null<PeerData*> peer) {
|
|
|
|
Unexpected("Item selection in Info::Profile::Members.");
|
|
|
|
}
|
|
|
|
|
|
|
|
void Members::peerListFinishSelectedRowsBunch() {
|
|
|
|
}
|
|
|
|
|
|
|
|
void Members::peerListSetDescription(
|
|
|
|
object_ptr<Ui::FlatLabel> description) {
|
|
|
|
description.destroy();
|
|
|
|
}
|
|
|
|
|
2017-09-25 16:06:53 +00:00
|
|
|
} // namespace Profile
|
|
|
|
} // namespace Info
|
|
|
|
|