mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-11 08:54:54 +00:00
Improved first display of personal channel in user profiles.
This commit is contained in:
parent
68cb568898
commit
deb9aa435b
@ -1240,9 +1240,6 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupPersonalChannel(
|
||||
) | rpl::map(rpl::mappers::_1 != nullptr));
|
||||
result->finishAnimating();
|
||||
|
||||
auto channelToggleValue = PersonalChannelValue(
|
||||
user
|
||||
) | rpl::map([=] { return !!user->personalChannelId(); });
|
||||
auto channel = PersonalChannelValue(
|
||||
user
|
||||
) | rpl::start_spawning(result->lifetime());
|
||||
@ -1270,8 +1267,10 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupPersonalChannel(
|
||||
object_ptr<Ui::SlideWrap<Ui::VerticalLayout>>(
|
||||
container,
|
||||
object_ptr<Ui::VerticalLayout>(container)));
|
||||
onlyChannelWrap->toggleOn(rpl::duplicate(channelToggleValue)
|
||||
| rpl::map(!rpl::mappers::_1));
|
||||
onlyChannelWrap->toggleOn(PersonalChannelValue(user) | rpl::map([=] {
|
||||
return user->personalChannelId()
|
||||
&& !user->personalChannelMessageId();
|
||||
}));
|
||||
onlyChannelWrap->finishAnimating();
|
||||
|
||||
Ui::AddDivider(onlyChannelWrap->entity());
|
||||
@ -1312,7 +1311,12 @@ object_ptr<Ui::RpWidget> DetailsFiller::setupPersonalChannel(
|
||||
object_ptr<Ui::SlideWrap<Ui::VerticalLayout>>(
|
||||
container,
|
||||
object_ptr<Ui::VerticalLayout>(container)));
|
||||
messageChannelWrap->toggleOn(rpl::duplicate(channelToggleValue));
|
||||
messageChannelWrap->toggleOn(PersonalChannelValue(
|
||||
user
|
||||
) | rpl::map([=] {
|
||||
return user->personalChannelId()
|
||||
&& user->personalChannelMessageId();
|
||||
}));
|
||||
messageChannelWrap->finishAnimating();
|
||||
|
||||
const auto clear = [=] {
|
||||
|
Loading…
Reference in New Issue
Block a user