mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 23:15:59 +00:00
Add "My Profile" instead of "My Stories".
This commit is contained in:
@@ -50,6 +50,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "info/channel_statistics/earn/earn_format.h"
|
||||
#include "info/channel_statistics/earn/earn_icons.h"
|
||||
#include "info/channel_statistics/earn/info_channel_earn_list.h"
|
||||
#include "info/profile/info_profile_cover.h"
|
||||
#include "info/profile/info_profile_icon.h"
|
||||
#include "info/profile/info_profile_phone_menu.h"
|
||||
#include "info/profile/info_profile_text.h"
|
||||
@@ -1240,9 +1241,9 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupInfo() {
|
||||
int rightSkip) {
|
||||
const auto parent = label->parentWidget();
|
||||
rpl::combine(
|
||||
label->geometryValue(),
|
||||
result->widthValue(),
|
||||
button->sizeValue()
|
||||
) | rpl::start_with_next([=](const QRect &, const QSize &buttonSize) {
|
||||
) | rpl::start_with_next([=](int, QSize buttonSize) {
|
||||
const auto s = parent->size();
|
||||
button->moveToRight(
|
||||
rightSkip,
|
||||
@@ -2010,6 +2011,9 @@ Ui::MultiSlideTracker DetailsFiller::fillUserButtons(
|
||||
using namespace rpl::mappers;
|
||||
|
||||
Ui::MultiSlideTracker tracker;
|
||||
if (user->isSelf()) {
|
||||
return tracker;
|
||||
}
|
||||
auto window = _controller->parentController();
|
||||
|
||||
auto addSendMessageButton = [&] {
|
||||
@@ -2034,24 +2038,7 @@ Ui::MultiSlideTracker DetailsFiller::fillUserButtons(
|
||||
tracker);
|
||||
};
|
||||
|
||||
if (user->isSelf()) {
|
||||
auto separator = _wrap->add(object_ptr<Ui::SlideWrap<>>(
|
||||
_wrap,
|
||||
object_ptr<Ui::PlainShadow>(_wrap),
|
||||
st::infoProfileSeparatorPadding)
|
||||
)->setDuration(
|
||||
st::infoSlideDuration
|
||||
);
|
||||
|
||||
addSendMessageButton();
|
||||
|
||||
separator->toggleOn(
|
||||
std::move(tracker).atLeastOneShownValue()
|
||||
);
|
||||
} else {
|
||||
addSendMessageButton();
|
||||
}
|
||||
|
||||
addSendMessageButton();
|
||||
addReportReaction(tracker);
|
||||
|
||||
return tracker;
|
||||
@@ -2722,5 +2709,42 @@ object_ptr<Ui::RpWidget> SetupChannelMembersAndManage(
|
||||
return result;
|
||||
}
|
||||
|
||||
Cover *AddCover(
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
not_null<Controller*> controller,
|
||||
not_null<PeerData*> peer,
|
||||
Data::ForumTopic *topic) {
|
||||
const auto result = topic
|
||||
? container->add(object_ptr<Cover>(
|
||||
container,
|
||||
controller->parentController(),
|
||||
topic))
|
||||
: container->add(object_ptr<Cover>(
|
||||
container,
|
||||
controller->parentController(),
|
||||
peer));
|
||||
result->showSection(
|
||||
) | rpl::start_with_next([=](Section section) {
|
||||
controller->showSection(topic
|
||||
? std::make_shared<Info::Memento>(topic, section)
|
||||
: std::make_shared<Info::Memento>(peer, section));
|
||||
}, result->lifetime());
|
||||
result->setOnlineCount(rpl::single(0));
|
||||
return result;
|
||||
}
|
||||
|
||||
void AddDetails(
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
not_null<Controller*> controller,
|
||||
not_null<PeerData*> peer,
|
||||
Data::ForumTopic *topic,
|
||||
Origin origin) {
|
||||
if (topic) {
|
||||
container->add(SetupDetails(controller, container, topic));
|
||||
} else {
|
||||
container->add(SetupDetails(controller, container, peer, origin));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Profile
|
||||
} // namespace Info
|
||||
|
Reference in New Issue
Block a user