diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index f7e37ced57..6e17ed5491 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -1240,9 +1240,6 @@ object_ptr 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 DetailsFiller::setupPersonalChannel( object_ptr>( container, object_ptr(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 DetailsFiller::setupPersonalChannel( object_ptr>( container, object_ptr(container))); - messageChannelWrap->toggleOn(rpl::duplicate(channelToggleValue)); + messageChannelWrap->toggleOn(PersonalChannelValue( + user + ) | rpl::map([=] { + return user->personalChannelId() + && user->personalChannelMessageId(); + })); messageChannelWrap->finishAnimating(); const auto clear = [=] {