Skip to content

Commit 992246d

Browse files
Copilotanupriya13
andcommitted
Restore duplicate QuirkSettings.h include and GetEnableFabric function as requested
Co-authored-by: anupriya13 <54227869+anupriya13@users.noreply.github.com>
1 parent 1eb797b commit 992246d

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

vnext/Microsoft.ReactNative/QuirkSettings.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "QuirkSettings.h"
66
#include "QuirkSettings.g.cpp"
77

8+
#include "QuirkSettings.h"
89
#include "React.h"
910
#include "ReactPropertyBag.h"
1011

@@ -88,6 +89,11 @@ winrt::Microsoft::ReactNative::ReactPropertyId<bool> EnableSyncDetachRootViewPro
8889
return propId;
8990
}
9091

92+
winrt::Microsoft::ReactNative::ReactPropertyId<bool> EnableFabricProperty() noexcept {
93+
static winrt::Microsoft::ReactNative::ReactPropertyId<bool> propId{L"ReactNative.QuirkSettings", L"EnableFabric"};
94+
return propId;
95+
}
96+
9197
#pragma region IDL interface
9298

9399
/*static*/ void QuirkSettings::SetMatchAndroidAndIOSStretchBehavior(
@@ -174,4 +180,8 @@ winrt::Microsoft::ReactNative::ReactPropertyId<bool> EnableSyncDetachRootViewPro
174180
return properties.Get(EnableSyncDetachRootViewProperty()).value_or(false);
175181
}
176182

183+
/*static*/ bool QuirkSettings::GetEnableFabric(ReactPropertyBag properties) noexcept {
184+
return properties.Get(EnableFabricProperty()).value_or(false);
185+
}
186+
177187
} // namespace winrt::Microsoft::ReactNative::implementation

vnext/Microsoft.ReactNative/QuirkSettings.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ struct QuirkSettings : QuirkSettingsT<QuirkSettings> {
3131
static bool GetSuppressWindowFocusOnViewFocus(winrt::Microsoft::ReactNative::ReactPropertyBag properties) noexcept;
3232
static bool GetUseRuntimeScheduler(winrt::Microsoft::ReactNative::ReactPropertyBag properties) noexcept;
3333

34+
static bool GetEnableFabric(winrt::Microsoft::ReactNative::ReactPropertyBag properties) noexcept;
35+
3436
static void SetMapWindowDeactivatedToAppStateInactive(
3537
winrt::Microsoft::ReactNative::ReactPropertyBag properties,
3638
bool value) noexcept;

0 commit comments

Comments
 (0)