Fabric: Unification of constructor signature of ComponentDescriptors
Summary: This is the first step to migrate the registration of Android-specific `ComponentDescriptors` to `ComponentDescriptorProviderRegistry`. `ComponentDescriptorProviderRegistry` is a never API for component registration that supports reactive registration and simplified signatures for `registry` (`add`) method. It's tedious to keep those signatures in sync with the base class (`ComponentDescriptor`), we have an idea how to make it better by using a single struct with all params but a migration to that will be a separate effort. The changes are pure syntactical. Changelog: [Internal] Internal changes in Fabric. Reviewed By: mdvacca Differential Revision: D18010488 fbshipit-source-id: 4cbfdbcae235b32a94b38df2095c956299764e59
This commit is contained in:
Родитель
72890965f3
Коммит
8a8ff63b7d
|
@ -22,8 +22,12 @@ class ModalHostViewComponentDescriptor final
|
|||
: public ConcreteComponentDescriptor<ModalHostViewShadowNode> {
|
||||
public:
|
||||
#ifdef ANDROID
|
||||
ModalHostViewComponentDescriptor(EventDispatcher::Weak eventDispatcher)
|
||||
: ConcreteComponentDescriptor(eventDispatcher) {}
|
||||
ModalHostViewComponentDescriptor(
|
||||
EventDispatcher::Weak eventDispatcher,
|
||||
ContextContainer::Shared const &contextContainer,
|
||||
ComponentDescriptor::Flavor const &flavor = {})
|
||||
: ConcreteComponentDescriptor(eventDispatcher, contextContainer, flavor) {
|
||||
}
|
||||
#else
|
||||
using ConcreteComponentDescriptor::ConcreteComponentDescriptor;
|
||||
#endif
|
||||
|
|
|
@ -23,8 +23,9 @@ class AndroidSwitchComponentDescriptor final
|
|||
public:
|
||||
AndroidSwitchComponentDescriptor(
|
||||
EventDispatcher::Weak eventDispatcher,
|
||||
ContextContainer::Shared const &contextContainer)
|
||||
: ConcreteComponentDescriptor(eventDispatcher),
|
||||
ContextContainer::Shared const &contextContainer,
|
||||
ComponentDescriptor::Flavor const &flavor = {})
|
||||
: ConcreteComponentDescriptor(eventDispatcher, contextContainer, flavor),
|
||||
measurementsManager_(std::make_shared<AndroidSwitchMeasurementsManager>(
|
||||
contextContainer)) {}
|
||||
|
||||
|
|
|
@ -21,10 +21,12 @@ class AndroidTextInputComponentDescriptor final
|
|||
public:
|
||||
AndroidTextInputComponentDescriptor(
|
||||
EventDispatcher::Weak eventDispatcher,
|
||||
const ContextContainer::Shared &contextContainer)
|
||||
const ContextContainer::Shared &contextContainer,
|
||||
ComponentDescriptor::Flavor const &flavor = {})
|
||||
: ConcreteComponentDescriptor<AndroidTextInputShadowNode>(
|
||||
eventDispatcher,
|
||||
contextContainer) {}
|
||||
contextContainer,
|
||||
flavor) {}
|
||||
|
||||
protected:
|
||||
void adopt(UnsharedShadowNode shadowNode) const override {
|
||||
|
|
Загрузка…
Ссылка в новой задаче