Fix build with Xcode.

This commit is contained in:
John Preston 2022-10-28 22:17:41 +04:00
parent fb0eee01f2
commit 079c36abf3
3 changed files with 6 additions and 6 deletions

View file

@ -628,7 +628,7 @@ void ContactStatus::setupState(not_null<PeerData*> peer, bool showInForum) {
PeerCustomStatus(peer), PeerCustomStatus(peer),
((channel && !showInForum) ((channel && !showInForum)
? Data::PeerFlagValue(channel, ChannelData::Flag::Forum) ? Data::PeerFlagValue(channel, ChannelData::Flag::Forum)
: rpl::single(false)) : (rpl::single(false) | rpl::type_erased()))
) | rpl::start_with_next([=]( ) | rpl::start_with_next([=](
State state, State state,
TextWithEntities status, TextWithEntities status,

View file

@ -358,7 +358,7 @@ rpl::producer<Ui::GroupCallBarContent> GroupCallBarContentByPeer(
Data::PeerUpdate::Flag::GroupCall), Data::PeerUpdate::Flag::GroupCall),
Core::App().calls().currentGroupCallValue(), Core::App().calls().currentGroupCallValue(),
((showInForum || !channel) ((showInForum || !channel)
? rpl::single(false) ? (rpl::single(false) | rpl::type_erased())
: Data::PeerFlagValue(channel, ChannelData::Flag::Forum)) : Data::PeerFlagValue(channel, ChannelData::Flag::Forum))
) | rpl::map([=](auto, Calls::GroupCall *current, bool hiddenByForum) { ) | rpl::map([=](auto, Calls::GroupCall *current, bool hiddenByForum) {
const auto call = peer->groupCall(); const auto call = peer->groupCall();

View file

@ -60,9 +60,9 @@ auto PlainPrimaryUsernameValue(not_null<PeerData*> peer) {
peer peer
) | rpl::map([=](std::vector<TextWithEntities> usernames) { ) | rpl::map([=](std::vector<TextWithEntities> usernames) {
if (!usernames.empty()) { if (!usernames.empty()) {
return rpl::single(usernames.front().text); return rpl::single(usernames.front().text) | rpl::type_erased();
} else { } else {
return PlainUsernameValue(peer); return PlainUsernameValue(peer) | rpl::type_erased();
} }
}) | rpl::flatten_latest(); }) | rpl::flatten_latest();
} }
@ -148,7 +148,7 @@ rpl::producer<TextWithEntities> UsernameValue(
bool primary) { bool primary) {
return (primary return (primary
? PlainPrimaryUsernameValue(user) ? PlainPrimaryUsernameValue(user)
: PlainUsernameValue(user) : (PlainUsernameValue(user) | rpl::type_erased())
) | rpl::map([](QString &&username) { ) | rpl::map([](QString &&username) {
return username.isEmpty() return username.isEmpty()
? QString() ? QString()
@ -223,7 +223,7 @@ rpl::producer<TextWithEntities> AboutValue(not_null<PeerData*> peer) {
rpl::producer<QString> LinkValue(not_null<PeerData*> peer, bool primary) { rpl::producer<QString> LinkValue(not_null<PeerData*> peer, bool primary) {
return (primary return (primary
? PlainPrimaryUsernameValue(peer) ? PlainPrimaryUsernameValue(peer)
: PlainUsernameValue(peer) : PlainUsernameValue(peer) | rpl::type_erased()
) | rpl::map([=](QString &&username) { ) | rpl::map([=](QString &&username) {
return username.isEmpty() return username.isEmpty()
? QString() ? QString()