react-native-windows 0.69.4 → 0.69.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -118,17 +118,22 @@ struct BrushCache {
118
118
  return RegisterBrush(resourceName, brush);
119
119
  }
120
120
 
121
- winrt::IInspectable resource{winrt::Application::Current().Resources().Lookup(winrt::box_value(resourceName))};
122
-
123
- if (auto brush = resource.try_as<xaml::Media::Brush>()) {
124
- return RegisterBrush(resourceName, brush);
125
- } else if (auto color = resource.try_as<winrt::Windows::UI::Color>()) {
126
- auto brush = xaml::Media::SolidColorBrush(color.value());
127
- return RegisterBrush(resourceName, brush);
121
+ const auto appResources{winrt::Application::Current().Resources()};
122
+ const auto boxedResourceName{winrt::box_value(resourceName)};
123
+ if (appResources.HasKey(boxedResourceName)) {
124
+ winrt::IInspectable resource{appResources.Lookup(boxedResourceName)};
125
+
126
+ if (auto brush = resource.try_as<xaml::Media::Brush>()) {
127
+ return RegisterBrush(resourceName, brush);
128
+ } else if (auto color = resource.try_as<winrt::Windows::UI::Color>()) {
129
+ auto brush = xaml::Media::SolidColorBrush(color.value());
130
+ return RegisterBrush(resourceName, brush);
131
+ }
128
132
  }
129
133
 
130
134
  assert(false && "Resource is not a Color or Brush");
131
- return nullptr;
135
+ return xaml::Media::SolidColorBrush(winrt::Colors::Transparent());
136
+ ;
132
137
  }
133
138
 
134
139
  xaml::Media::Brush RegisterBrush(winrt::hstring resourceName, const xaml::Media::Brush &brush) {
@@ -143,7 +143,7 @@ bool ImageViewManager::UpdateProperty(
143
143
  } else if (propertyName == "tintColor") {
144
144
  const auto isValidColorValue = IsValidColorValue(propertyValue);
145
145
  if (isValidColorValue || propertyValue.IsNull()) {
146
- const auto color = isValidColorValue ? ColorFrom(propertyValue) : winrt::Colors::Transparent();
146
+ const auto color = isValidColorValue ? SolidColorBrushFrom(propertyValue).Color() : winrt::Colors::Transparent();
147
147
  reactImage->TintColor(color);
148
148
  }
149
149
  // Override default accessibility behavior
@@ -10,10 +10,10 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.69.4</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.69.5</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>69</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>4</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>5</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
18
  </PropertyGroup>
19
19
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.69.4",
3
+ "version": "0.69.5",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",