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),
((channel && !showInForum)
? Data::PeerFlagValue(channel, ChannelData::Flag::Forum)
: rpl::single(false))
: (rpl::single(false) | rpl::type_erased()))
) | rpl::start_with_next([=](
State state,
TextWithEntities status,

View File

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

View File

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