mirror of https://github.com/procxx/kepka.git
				
				
				
			Replace $ with _ in rpl::mappers.
This commit is contained in:
		
							parent
							
								
									ac99318f34
								
							
						
					
					
						commit
						eb8800f2d4
					
				| 
						 | 
					@ -50,7 +50,7 @@ void createErrorLabel(
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		using namespace rpl::mappers;
 | 
							using namespace rpl::mappers;
 | 
				
			||||||
		saved->shownValue()
 | 
							saved->shownValue()
 | 
				
			||||||
			| rpl::filter($1 == false)
 | 
								| rpl::filter(_1 == false)
 | 
				
			||||||
			| rpl::take(1)
 | 
								| rpl::take(1)
 | 
				
			||||||
			| rpl::start_with_done(
 | 
								| rpl::start_with_done(
 | 
				
			||||||
				std::move(destroy),
 | 
									std::move(destroy),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -155,7 +155,7 @@ inline auto RestrictionValue(
 | 
				
			||||||
inline auto CanWriteValue(UserData *user) {
 | 
					inline auto CanWriteValue(UserData *user) {
 | 
				
			||||||
	using namespace rpl::mappers;
 | 
						using namespace rpl::mappers;
 | 
				
			||||||
	return PeerFlagValue(user, MTPDuser::Flag::f_deleted)
 | 
						return PeerFlagValue(user, MTPDuser::Flag::f_deleted)
 | 
				
			||||||
		| rpl::map(!$1);
 | 
							| rpl::map(!_1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
inline auto CanWriteValue(ChatData *chat) {
 | 
					inline auto CanWriteValue(ChatData *chat) {
 | 
				
			||||||
| 
						 | 
					@ -166,7 +166,7 @@ inline auto CanWriteValue(ChatData *chat) {
 | 
				
			||||||
		| MTPDchat::Flag::f_left
 | 
							| MTPDchat::Flag::f_left
 | 
				
			||||||
		| MTPDchat::Flag::f_kicked;
 | 
							| MTPDchat::Flag::f_kicked;
 | 
				
			||||||
	return PeerFlagsValue(chat, mask)
 | 
						return PeerFlagsValue(chat, mask)
 | 
				
			||||||
		| rpl::map(!$1);
 | 
							| rpl::map(!_1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
inline auto CanWriteValue(ChannelData *channel) {
 | 
					inline auto CanWriteValue(ChannelData *channel) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -60,7 +60,7 @@ ContentWidget::ContentWidget(
 | 
				
			||||||
		rpl::combine(
 | 
							rpl::combine(
 | 
				
			||||||
			_controller->wrapValue(),
 | 
								_controller->wrapValue(),
 | 
				
			||||||
			_controller->searchEnabledByContent(),
 | 
								_controller->searchEnabledByContent(),
 | 
				
			||||||
			($1 == Wrap::Layer) && $2)
 | 
								(_1 == Wrap::Layer) && _2)
 | 
				
			||||||
			| rpl::start_with_next([this](bool shown) {
 | 
								| rpl::start_with_next([this](bool shown) {
 | 
				
			||||||
				refreshSearchField(shown);
 | 
									refreshSearchField(shown);
 | 
				
			||||||
			}, lifetime());
 | 
								}, lifetime());
 | 
				
			||||||
| 
						 | 
					@ -135,7 +135,7 @@ Ui::RpWidget *ContentWidget::doSetInnerWidget(
 | 
				
			||||||
		_scroll->scrollTopValue(),
 | 
							_scroll->scrollTopValue(),
 | 
				
			||||||
		_scroll->heightValue(),
 | 
							_scroll->heightValue(),
 | 
				
			||||||
		_inner->desiredHeightValue(),
 | 
							_inner->desiredHeightValue(),
 | 
				
			||||||
		tuple($1, $1 + $2, $3))
 | 
							tuple(_1, _1 + _2, _3))
 | 
				
			||||||
		| rpl::start_with_next([inner = _inner](
 | 
							| rpl::start_with_next([inner = _inner](
 | 
				
			||||||
				int top,
 | 
									int top,
 | 
				
			||||||
				int bottom,
 | 
									int bottom,
 | 
				
			||||||
| 
						 | 
					@ -163,7 +163,7 @@ rpl::producer<int> ContentWidget::desiredHeightValue() const {
 | 
				
			||||||
	return rpl::combine(
 | 
						return rpl::combine(
 | 
				
			||||||
		_inner->desiredHeightValue(),
 | 
							_inner->desiredHeightValue(),
 | 
				
			||||||
		_scrollTopSkip.value())
 | 
							_scrollTopSkip.value())
 | 
				
			||||||
		| rpl::map($1 + $2);
 | 
							| rpl::map(_1 + _2);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rpl::producer<bool> ContentWidget::desiredShadowVisibility() const {
 | 
					rpl::producer<bool> ContentWidget::desiredShadowVisibility() const {
 | 
				
			||||||
| 
						 | 
					@ -171,7 +171,7 @@ rpl::producer<bool> ContentWidget::desiredShadowVisibility() const {
 | 
				
			||||||
	return rpl::combine(
 | 
						return rpl::combine(
 | 
				
			||||||
		_scroll->scrollTopValue(),
 | 
							_scroll->scrollTopValue(),
 | 
				
			||||||
		_scrollTopSkip.value())
 | 
							_scrollTopSkip.value())
 | 
				
			||||||
		| rpl::map(($1 > 0) || ($2 > 0));
 | 
							| rpl::map((_1 > 0) || (_2 > 0));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool ContentWidget::hasTopBarShadow() const {
 | 
					bool ContentWidget::hasTopBarShadow() const {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -116,8 +116,8 @@ void WrapWidget::startInjectingActivePeerProfiles() {
 | 
				
			||||||
	rpl::combine(
 | 
						rpl::combine(
 | 
				
			||||||
		_wrap.value(),
 | 
							_wrap.value(),
 | 
				
			||||||
		_controller->window()->activePeer.value())
 | 
							_controller->window()->activePeer.value())
 | 
				
			||||||
		| rpl::filter(($1 == Wrap::Side) && ($2 != nullptr))
 | 
							| rpl::filter((_1 == Wrap::Side) && (_2 != nullptr))
 | 
				
			||||||
		| rpl::map($2)
 | 
							| rpl::map(_2)
 | 
				
			||||||
		| rpl::start_with_next([this](not_null<PeerData*> peer) {
 | 
							| rpl::start_with_next([this](not_null<PeerData*> peer) {
 | 
				
			||||||
			injectActivePeerProfile(peer);
 | 
								injectActivePeerProfile(peer);
 | 
				
			||||||
		}, lifetime());
 | 
							}, lifetime());
 | 
				
			||||||
| 
						 | 
					@ -554,7 +554,7 @@ rpl::producer<bool> WrapWidget::topShadowToggledValue() const {
 | 
				
			||||||
	//return rpl::combine(
 | 
						//return rpl::combine(
 | 
				
			||||||
	//	_controller->wrapValue(),
 | 
						//	_controller->wrapValue(),
 | 
				
			||||||
	//	_desiredShadowVisibilities.events() | rpl::flatten_latest(),
 | 
						//	_desiredShadowVisibilities.events() | rpl::flatten_latest(),
 | 
				
			||||||
	//	($1 == Wrap::Side) || $2);
 | 
						//	(_1 == Wrap::Side) || _2);
 | 
				
			||||||
	return _desiredShadowVisibilities.events()
 | 
						return _desiredShadowVisibilities.events()
 | 
				
			||||||
		| rpl::flatten_latest();
 | 
							| rpl::flatten_latest();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -564,7 +564,7 @@ rpl::producer<int> WrapWidget::desiredHeightForContent() const {
 | 
				
			||||||
	return rpl::combine(
 | 
						return rpl::combine(
 | 
				
			||||||
		_content->desiredHeightValue(),
 | 
							_content->desiredHeightValue(),
 | 
				
			||||||
		topWidget()->heightValue(),
 | 
							topWidget()->heightValue(),
 | 
				
			||||||
		$1 + $2);
 | 
							_1 + _2);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rpl::producer<SelectedItems> WrapWidget::selectedListValue() const {
 | 
					rpl::producer<SelectedItems> WrapWidget::selectedListValue() const {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -83,7 +83,7 @@ inline auto AddCountedButton(
 | 
				
			||||||
	)->setDuration(
 | 
						)->setDuration(
 | 
				
			||||||
		st::infoSlideDuration
 | 
							st::infoSlideDuration
 | 
				
			||||||
	)->toggleOn(
 | 
						)->toggleOn(
 | 
				
			||||||
		rpl::duplicate(forked) | rpl::map($1 > 0)
 | 
							rpl::duplicate(forked) | rpl::map(_1 > 0)
 | 
				
			||||||
	);
 | 
						);
 | 
				
			||||||
	tracker.track(button);
 | 
						tracker.track(button);
 | 
				
			||||||
	return button;
 | 
						return button;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -357,7 +357,7 @@ void InnerWidget::setScrollHeightValue(rpl::producer<int> value) {
 | 
				
			||||||
		std::move(value),
 | 
							std::move(value),
 | 
				
			||||||
		_listTops.events_starting_with(_list->topValue())
 | 
							_listTops.events_starting_with(_list->topValue())
 | 
				
			||||||
			| rpl::flatten_latest(),
 | 
								| rpl::flatten_latest(),
 | 
				
			||||||
		$1 - $2));
 | 
							_1 - _2));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
} // namespace Media
 | 
					} // namespace Media
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -328,7 +328,7 @@ Ui::MultiSlideTracker DetailsFiller::fillUserButtons(
 | 
				
			||||||
	auto sendMessageVisible = rpl::combine(
 | 
						auto sendMessageVisible = rpl::combine(
 | 
				
			||||||
		_controller->wrapValue(),
 | 
							_controller->wrapValue(),
 | 
				
			||||||
		window->historyPeer.value(),
 | 
							window->historyPeer.value(),
 | 
				
			||||||
		($1 != Wrap::Side) || ($2 != user));
 | 
							(_1 != Wrap::Side) || (_2 != user));
 | 
				
			||||||
	auto sendMessage = [window, user] {
 | 
						auto sendMessage = [window, user] {
 | 
				
			||||||
		window->showPeerHistory(
 | 
							window->showPeerHistory(
 | 
				
			||||||
			user,
 | 
								user,
 | 
				
			||||||
| 
						 | 
					@ -359,7 +359,7 @@ Ui::MultiSlideTracker DetailsFiller::fillChannelButtons(
 | 
				
			||||||
	auto viewChannelVisible = rpl::combine(
 | 
						auto viewChannelVisible = rpl::combine(
 | 
				
			||||||
		_controller->wrapValue(),
 | 
							_controller->wrapValue(),
 | 
				
			||||||
		window->historyPeer.value(),
 | 
							window->historyPeer.value(),
 | 
				
			||||||
		($1 != Wrap::Side) || ($2 != channel));
 | 
							(_1 != Wrap::Side) || (_2 != channel));
 | 
				
			||||||
	auto viewChannel = [=] {
 | 
						auto viewChannel = [=] {
 | 
				
			||||||
		window->showPeerHistory(
 | 
							window->showPeerHistory(
 | 
				
			||||||
			channel,
 | 
								channel,
 | 
				
			||||||
| 
						 | 
					@ -589,7 +589,7 @@ void ActionsFiller::addJoinChannelAction(
 | 
				
			||||||
		not_null<ChannelData*> channel) {
 | 
							not_null<ChannelData*> channel) {
 | 
				
			||||||
	using namespace rpl::mappers;
 | 
						using namespace rpl::mappers;
 | 
				
			||||||
	auto joinVisible = AmInChannelValue(channel)
 | 
						auto joinVisible = AmInChannelValue(channel)
 | 
				
			||||||
		| rpl::map(!$1)
 | 
							| rpl::map(!_1)
 | 
				
			||||||
		| rpl::start_spawning(_wrap->lifetime());
 | 
							| rpl::start_spawning(_wrap->lifetime());
 | 
				
			||||||
	AddActionButton(
 | 
						AddActionButton(
 | 
				
			||||||
		_wrap,
 | 
							_wrap,
 | 
				
			||||||
| 
						 | 
					@ -724,7 +724,7 @@ object_ptr<Ui::RpWidget> SetupChannelMembers(
 | 
				
			||||||
		Data::PeerFullFlagValue(
 | 
							Data::PeerFullFlagValue(
 | 
				
			||||||
			channel,
 | 
								channel,
 | 
				
			||||||
			MTPDchannelFull::Flag::f_can_view_participants),
 | 
								MTPDchannelFull::Flag::f_can_view_participants),
 | 
				
			||||||
			($1 > 0) && $2);
 | 
								(_1 > 0) && _2);
 | 
				
			||||||
	auto membersText = MembersCountValue(channel)
 | 
						auto membersText = MembersCountValue(channel)
 | 
				
			||||||
		| rpl::map([](int count) {
 | 
							| rpl::map([](int count) {
 | 
				
			||||||
		return lng_chat_status_members(lt_count, count);
 | 
							return lng_chat_status_members(lt_count, count);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -262,7 +262,7 @@ void Cover::setupChildGeometry() {
 | 
				
			||||||
	rpl::combine(
 | 
						rpl::combine(
 | 
				
			||||||
		toggleShownValue(),
 | 
							toggleShownValue(),
 | 
				
			||||||
		widthValue(),
 | 
							widthValue(),
 | 
				
			||||||
		$2)
 | 
							_2)
 | 
				
			||||||
		| rpl::start_with_next([this](int newWidth) {
 | 
							| rpl::start_with_next([this](int newWidth) {
 | 
				
			||||||
			_userpic->moveToLeft(
 | 
								_userpic->moveToLeft(
 | 
				
			||||||
				st::infoProfilePhotoLeft,
 | 
									st::infoProfilePhotoLeft,
 | 
				
			||||||
| 
						 | 
					@ -441,7 +441,7 @@ void SharedMediaCover::createLabel() {
 | 
				
			||||||
	rpl::combine(
 | 
						rpl::combine(
 | 
				
			||||||
		toggleShownValue(),
 | 
							toggleShownValue(),
 | 
				
			||||||
		widthValue(),
 | 
							widthValue(),
 | 
				
			||||||
		$2)
 | 
							_2)
 | 
				
			||||||
		| rpl::start_with_next([this, weak = label.data()](int newWidth) {
 | 
							| rpl::start_with_next([this, weak = label.data()](int newWidth) {
 | 
				
			||||||
			auto availableWidth = newWidth
 | 
								auto availableWidth = newWidth
 | 
				
			||||||
				- st::infoBlockHeaderPosition.x()
 | 
									- st::infoBlockHeaderPosition.x()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -83,7 +83,7 @@ bool InnerWidget::canHideDetailsEver() const {
 | 
				
			||||||
rpl::producer<bool> InnerWidget::canHideDetails() const {
 | 
					rpl::producer<bool> InnerWidget::canHideDetails() const {
 | 
				
			||||||
	using namespace rpl::mappers;
 | 
						using namespace rpl::mappers;
 | 
				
			||||||
	return MembersCountValue(_peer)
 | 
						return MembersCountValue(_peer)
 | 
				
			||||||
		| rpl::map($1 > 0);
 | 
							| rpl::map(_1 > 0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
object_ptr<Ui::RpWidget> InnerWidget::setupContent(
 | 
					object_ptr<Ui::RpWidget> InnerWidget::setupContent(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -193,7 +193,7 @@ void Members::setupButtons() {
 | 
				
			||||||
	});
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	//auto searchShown = MembersCountValue(_peer)
 | 
						//auto searchShown = MembersCountValue(_peer)
 | 
				
			||||||
	//	| rpl::map($1 >= kEnableSearchMembersAfterCount)
 | 
						//	| rpl::map(_1 >= kEnableSearchMembersAfterCount)
 | 
				
			||||||
	//	| rpl::distinct_until_changed()
 | 
						//	| rpl::distinct_until_changed()
 | 
				
			||||||
	//	| rpl::start_spawning(lifetime());
 | 
						//	| rpl::start_spawning(lifetime());
 | 
				
			||||||
	//_search->showOn(rpl::duplicate(searchShown));
 | 
						//_search->showOn(rpl::duplicate(searchShown));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -167,7 +167,7 @@ rpl::producer<bool> CanAddContactValue(
 | 
				
			||||||
	return rpl::combine(
 | 
						return rpl::combine(
 | 
				
			||||||
			IsContactValue(user),
 | 
								IsContactValue(user),
 | 
				
			||||||
			CanShareContactValue(user),
 | 
								CanShareContactValue(user),
 | 
				
			||||||
			!$1 && $2);
 | 
								!_1 && _2);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rpl::producer<bool> AmInChannelValue(
 | 
					rpl::producer<bool> AmInChannelValue(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -257,7 +257,7 @@ MainWidget::MainWidget(
 | 
				
			||||||
				? Data::CanWriteValue(peer)
 | 
									? Data::CanWriteValue(peer)
 | 
				
			||||||
				: rpl::single(false);
 | 
									: rpl::single(false);
 | 
				
			||||||
			return std::move(canWrite)
 | 
								return std::move(canWrite)
 | 
				
			||||||
					| rpl::map(tuple(peer, $1));
 | 
										| rpl::map(tuple(peer, _1));
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		| rpl::flatten_latest()
 | 
							| rpl::flatten_latest()
 | 
				
			||||||
		| rpl::start_with_next([this](PeerData *peer, bool canWrite) {
 | 
							| rpl::start_with_next([this](PeerData *peer, bool canWrite) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,8 +97,8 @@ public:
 | 
				
			||||||
	auto operator()(producer<Value, Error, Generator> &&initial) {
 | 
						auto operator()(producer<Value, Error, Generator> &&initial) {
 | 
				
			||||||
		using namespace mappers;
 | 
							using namespace mappers;
 | 
				
			||||||
		return combine(std::move(initial), std::move(_filterer))
 | 
							return combine(std::move(initial), std::move(_filterer))
 | 
				
			||||||
			| filter($2)
 | 
								| filter(_2)
 | 
				
			||||||
			| map($1_of_two);
 | 
								| map(_1_of_two);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -87,11 +87,6 @@ private:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
template <typename Type>
 | 
					 | 
				
			||||||
inline value_mapper<std::decay_t<Type>> make_value_mapper(Type &&value) {
 | 
					 | 
				
			||||||
	return { std::forward<Type>(value) };
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
template <typename Type>
 | 
					template <typename Type>
 | 
				
			||||||
struct wrap_mapper {
 | 
					struct wrap_mapper {
 | 
				
			||||||
	using type = std::conditional_t<
 | 
						using type = std::conditional_t<
 | 
				
			||||||
| 
						 | 
					@ -475,33 +470,18 @@ tuple_mapper<Args...> tuple(Args &&...args) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace mappers {
 | 
					namespace mappers {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
constexpr const details::argument_mapper<0> $1;
 | 
					constexpr const details::argument_mapper<0> _1;
 | 
				
			||||||
constexpr const details::argument_mapper<1> $2;
 | 
					constexpr const details::argument_mapper<1> _2;
 | 
				
			||||||
constexpr const details::argument_mapper<2> $3;
 | 
					constexpr const details::argument_mapper<2> _3;
 | 
				
			||||||
constexpr const details::argument_mapper<3> $4;
 | 
					constexpr const details::argument_mapper<3> _4;
 | 
				
			||||||
constexpr const details::argument_mapper<4> $5;
 | 
					constexpr const details::argument_mapper<4> _5;
 | 
				
			||||||
constexpr const details::argument_mapper<5> $6;
 | 
					constexpr const details::argument_mapper<5> _6;
 | 
				
			||||||
constexpr const details::argument_mapper<6> $7;
 | 
					constexpr const details::argument_mapper<6> _7;
 | 
				
			||||||
constexpr const details::argument_mapper<7> $8;
 | 
					constexpr const details::argument_mapper<7> _8;
 | 
				
			||||||
constexpr const details::argument_mapper<8> $9;
 | 
					constexpr const details::argument_mapper<8> _9;
 | 
				
			||||||
constexpr const details::argument_mapper<9> $10;
 | 
					constexpr const details::argument_mapper<9> _10;
 | 
				
			||||||
constexpr const details::argument_mapper<10> $11;
 | 
					 | 
				
			||||||
constexpr const details::argument_mapper<11> $12;
 | 
					 | 
				
			||||||
constexpr const details::argument_mapper<12> $13;
 | 
					 | 
				
			||||||
constexpr const details::argument_mapper<13> $14;
 | 
					 | 
				
			||||||
constexpr const details::argument_mapper<14> $15;
 | 
					 | 
				
			||||||
constexpr const details::argument_mapper<15> $16;
 | 
					 | 
				
			||||||
constexpr const details::argument_mapper<16> $17;
 | 
					 | 
				
			||||||
constexpr const details::argument_mapper<17> $18;
 | 
					 | 
				
			||||||
constexpr const details::argument_mapper<18> $19;
 | 
					 | 
				
			||||||
constexpr const details::argument_mapper<19> $20;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
template <typename Type>
 | 
					constexpr const auto _1_of_two = ((void)_2, _1);
 | 
				
			||||||
inline auto $val(Type &&value) {
 | 
					 | 
				
			||||||
	return details::make_value_mapper(std::forward<Type>(value));
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
constexpr const auto $1_of_two = ((void)$2, $1);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
} // namespace mappers
 | 
					} // namespace mappers
 | 
				
			||||||
} // namespace rpl
 | 
					} // namespace rpl
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -384,7 +384,7 @@ TEST_CASE("basic operators tests", "[rpl::operators]") {
 | 
				
			||||||
				a.events(),
 | 
									a.events(),
 | 
				
			||||||
				b.events(),
 | 
									b.events(),
 | 
				
			||||||
				c.events(),
 | 
									c.events(),
 | 
				
			||||||
				$1 + $2 + $3 + 10)
 | 
									_1 + _2 + _3 + 10)
 | 
				
			||||||
				| start_with_next([=](int value) {
 | 
									| start_with_next([=](int value) {
 | 
				
			||||||
					*sum += std::to_string(value);
 | 
										*sum += std::to_string(value);
 | 
				
			||||||
				}, lifetime);
 | 
									}, lifetime);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,7 +54,7 @@ Layer::Layer()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	using namespace rpl::mappers;
 | 
						using namespace rpl::mappers;
 | 
				
			||||||
	_fixedBarShadow->toggleOn(_scroll->scrollTopValue()
 | 
						_fixedBarShadow->toggleOn(_scroll->scrollTopValue()
 | 
				
			||||||
		| rpl::map($1 > 0));
 | 
							| rpl::map(_1 > 0));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void Layer::setCloseClickHandler(base::lambda<void()> callback) {
 | 
					void Layer::setCloseClickHandler(base::lambda<void()> callback) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,7 @@ AbstractButton::AbstractButton(QWidget *parent) : RpWidget(parent) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	using namespace rpl::mappers;
 | 
						using namespace rpl::mappers;
 | 
				
			||||||
	shownValue()
 | 
						shownValue()
 | 
				
			||||||
		| rpl::filter($1 == false)
 | 
							| rpl::filter(_1 == false)
 | 
				
			||||||
		| rpl::start_with_next([this] { clearState(); }, lifetime());
 | 
							| rpl::start_with_next([this] { clearState(); }, lifetime());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue