mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Closed alpha version 4007001001: Fix build.
This commit is contained in:
parent
004a60ded5
commit
2a06182d1a
2 changed files with 0 additions and 97 deletions
|
@ -106,13 +106,6 @@ private:
|
||||||
Ui::FilterLinkHeaderType type,
|
Ui::FilterLinkHeaderType type,
|
||||||
const QString &title) {
|
const QString &title) {
|
||||||
using Type = Ui::FilterLinkHeaderType;
|
using Type = Ui::FilterLinkHeaderType;
|
||||||
const auto phrase = (type == Type::AddingFilter)
|
|
||||||
? tr::lng_filters_by_link_sure
|
|
||||||
: (type == Type::AddingChats)
|
|
||||||
? tr::lng_filters_by_link_more_sure
|
|
||||||
: (type == Type::AllAdded)
|
|
||||||
? tr::lng_filters_by_link_already_about
|
|
||||||
: tr::lng_filters_by_link_remove_sure;
|
|
||||||
auto boldTitle = Ui::Text::Bold(title);
|
auto boldTitle = Ui::Text::Bold(title);
|
||||||
return (type == Type::AddingFilter)
|
return (type == Type::AddingFilter)
|
||||||
? tr::lng_filters_by_link_sure(
|
? tr::lng_filters_by_link_sure(
|
||||||
|
@ -194,7 +187,6 @@ void InitFilterLinkHeader(
|
||||||
const auto guard = gsl::finally([&] { state->processing = false; });
|
const auto guard = gsl::finally([&] { state->processing = false; });
|
||||||
|
|
||||||
const auto top = box->scrollTop();
|
const auto top = box->scrollTop();
|
||||||
const auto height = box->scrollHeight();
|
|
||||||
const auto headerHeight = std::max(max - top, min);
|
const auto headerHeight = std::max(max - top, min);
|
||||||
const auto addedTopHeight = max - headerHeight;
|
const auto addedTopHeight = max - headerHeight;
|
||||||
widget->resize(widget->width(), headerHeight);
|
widget->resize(widget->width(), headerHeight);
|
||||||
|
@ -739,7 +731,6 @@ void CheckFilterInvite(
|
||||||
already = parseList(data.valready_peers());
|
already = parseList(data.valready_peers());
|
||||||
});
|
});
|
||||||
|
|
||||||
const auto &filters = owner.chatsFilters();
|
|
||||||
const auto notLoaded = filterId
|
const auto notLoaded = filterId
|
||||||
&& !ranges::contains(
|
&& !ranges::contains(
|
||||||
owner.chatsFilters().list(),
|
owner.chatsFilters().list(),
|
||||||
|
|
|
@ -136,37 +136,6 @@ void ChatFilterLinkBox(
|
||||||
box->setTitle(tr::lng_group_invite_edit_title());
|
box->setTitle(tr::lng_group_invite_edit_title());
|
||||||
|
|
||||||
const auto container = box->verticalLayout();
|
const auto container = box->verticalLayout();
|
||||||
const auto addTitle = [&](
|
|
||||||
not_null<Ui::VerticalLayout*> container,
|
|
||||||
rpl::producer<QString> text) {
|
|
||||||
container->add(
|
|
||||||
object_ptr<Ui::FlatLabel>(
|
|
||||||
container,
|
|
||||||
std::move(text),
|
|
||||||
st::settingsSubsectionTitle),
|
|
||||||
(st::settingsSubsectionTitlePadding
|
|
||||||
+ style::margins(0, st::settingsSectionSkip, 0, 0)));
|
|
||||||
};
|
|
||||||
const auto addDivider = [&](
|
|
||||||
not_null<Ui::VerticalLayout*> container,
|
|
||||||
rpl::producer<QString> text,
|
|
||||||
style::margins margins = style::margins()) {
|
|
||||||
container->add(
|
|
||||||
object_ptr<Ui::DividerLabel>(
|
|
||||||
container,
|
|
||||||
object_ptr<Ui::FlatLabel>(
|
|
||||||
container,
|
|
||||||
std::move(text),
|
|
||||||
st::boxDividerLabel),
|
|
||||||
st::settingsDividerLabelPadding),
|
|
||||||
margins);
|
|
||||||
};
|
|
||||||
|
|
||||||
struct State {
|
|
||||||
};
|
|
||||||
const auto state = box->lifetime().make_state<State>(State{
|
|
||||||
});
|
|
||||||
|
|
||||||
const auto labelField = container->add(
|
const auto labelField = container->add(
|
||||||
object_ptr<Ui::InputField>(
|
object_ptr<Ui::InputField>(
|
||||||
container,
|
container,
|
||||||
|
@ -477,7 +446,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void appendRow(const InviteLinkData &data);
|
void appendRow(const InviteLinkData &data);
|
||||||
bool removeRow(const QString &link);
|
|
||||||
|
|
||||||
void rebuild(const std::vector<InviteLinkData> &rows);
|
void rebuild(const std::vector<InviteLinkData> &rows);
|
||||||
|
|
||||||
|
@ -718,7 +686,6 @@ void LinkController::prepare() {
|
||||||
peer,
|
peer,
|
||||||
error ? error->status : FilterChatStatusText(peer),
|
error ? error->status : FilterChatStatusText(peer),
|
||||||
error.has_value());
|
error.has_value());
|
||||||
const auto raw = row.get();
|
|
||||||
delegate()->peerListAppendRow(std::move(row));
|
delegate()->peerListAppendRow(std::move(row));
|
||||||
if (error) {
|
if (error) {
|
||||||
_denied.emplace(peer, error->toast);
|
_denied.emplace(peer, error->toast);
|
||||||
|
@ -988,14 +955,6 @@ void LinksController::appendRow(const InviteLinkData &data) {
|
||||||
delegate()->peerListAppendRow(std::make_unique<LinkRow>(this, data));
|
delegate()->peerListAppendRow(std::make_unique<LinkRow>(this, data));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LinksController::removeRow(const QString &link) {
|
|
||||||
if (const auto row = delegate()->peerListFindRow(ComputeRowId(link))) {
|
|
||||||
delegate()->peerListRemoveRow(row);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LinksController::rowUpdateRow(not_null<LinkRow*> row) {
|
void LinksController::rowUpdateRow(not_null<LinkRow*> row) {
|
||||||
delegate()->peerListUpdateRow(row);
|
delegate()->peerListUpdateRow(row);
|
||||||
}
|
}
|
||||||
|
@ -1014,7 +973,6 @@ void LinksController::rowPaintIcon(
|
||||||
}
|
}
|
||||||
Unexpected("Color in LinksController::rowPaintIcon.");
|
Unexpected("Color in LinksController::rowPaintIcon.");
|
||||||
}();
|
}();
|
||||||
const auto stroke = st::inviteLinkIconStroke;
|
|
||||||
auto &icon = _icons[int(color)];
|
auto &icon = _icons[int(color)];
|
||||||
if (icon.isNull()) {
|
if (icon.isNull()) {
|
||||||
icon = QImage(
|
icon = QImage(
|
||||||
|
@ -1035,51 +993,6 @@ void LinksController::rowPaintIcon(
|
||||||
p.drawImage(x + skip, y + skip, icon);
|
p.drawImage(x + skip, y + skip, icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
class LinkChatsController final
|
|
||||||
: public PeerListController
|
|
||||||
, public base::has_weak_ptr {
|
|
||||||
public:
|
|
||||||
LinkChatsController(
|
|
||||||
not_null<Window::SessionController*> controller,
|
|
||||||
FilterId id,
|
|
||||||
const InviteLinkData &data);
|
|
||||||
~LinkChatsController();
|
|
||||||
|
|
||||||
void prepare() override;
|
|
||||||
void rowClicked(not_null<PeerListRow*> row) override;
|
|
||||||
Main::Session &session() const override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
const not_null<Window::SessionController*> _controller;
|
|
||||||
InviteLinkData _data;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
LinkChatsController::LinkChatsController(
|
|
||||||
not_null<Window::SessionController*> controller,
|
|
||||||
FilterId id,
|
|
||||||
const InviteLinkData &data)
|
|
||||||
: _controller(controller)
|
|
||||||
, _data(data) {
|
|
||||||
}
|
|
||||||
|
|
||||||
LinkChatsController::~LinkChatsController() = default;
|
|
||||||
|
|
||||||
void LinkChatsController::prepare() {
|
|
||||||
for (const auto &history : _data.chats) {
|
|
||||||
delegate()->peerListAppendRow(
|
|
||||||
std::make_unique<PeerListRow>(history->peer));
|
|
||||||
}
|
|
||||||
delegate()->peerListRefreshRows();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LinkChatsController::rowClicked(not_null<PeerListRow*> row) {
|
|
||||||
}
|
|
||||||
|
|
||||||
Main::Session &LinkChatsController::session() const {
|
|
||||||
return _controller->session();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
std::vector<not_null<PeerData*>> CollectFilterLinkChats(
|
std::vector<not_null<PeerData*>> CollectFilterLinkChats(
|
||||||
|
@ -1157,7 +1070,6 @@ void EditLinkChats(
|
||||||
MTPstring(), // title
|
MTPstring(), // title
|
||||||
MTP_vector<MTPInputPeer>(std::move(mtpPeers))
|
MTP_vector<MTPInputPeer>(std::move(mtpPeers))
|
||||||
)).done([=](const MTPExportedChatlistInvite &result) {
|
)).done([=](const MTPExportedChatlistInvite &result) {
|
||||||
const auto &data = result.data();
|
|
||||||
const auto link = session->data().chatsFilters().add(id, result);
|
const auto link = session->data().chatsFilters().add(id, result);
|
||||||
done(QString());
|
done(QString());
|
||||||
}).fail([=](const MTP::Error &error) {
|
}).fail([=](const MTP::Error &error) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue