-
Notifications
You must be signed in to change notification settings - Fork 988
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9aa9dc1
commit 851dbcb
Showing
9 changed files
with
132 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- /tmp/tmp-status-mobile-61974dae4/tmp.6k5ZPUa0Hp/BlurView.ios.tsx 2024-04-16 17:07:33.229847000 +0200 | ||
+++ ./node_modules/@react-native-community/blur/src/components/BlurView.ios.tsx 2024-04-16 17:07:58.540617624 +0200 | ||
@@ -6,6 +6,7 @@ | ||
| 'dark' | ||
| 'light' | ||
| 'xlight' | ||
+ | 'transparent' | ||
| 'prominent' | ||
| 'regular' | ||
| 'extraDark' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- /tmp/tmp-status-mobile-61974dae4/tmp.tvVYHZMYBf/BlurView.mm 2024-04-16 17:06:06.410185000 +0200 | ||
+++ ./node_modules/@react-native-community/blur/ios/BlurView.mm 2024-04-16 17:06:49.352719720 +0200 | ||
@@ -73,7 +73,7 @@ | ||
{ | ||
const auto &oldViewProps = *std::static_pointer_cast<const BlurViewProps>(_props); | ||
const auto &newViewProps = *std::static_pointer_cast<const BlurViewProps>(props); | ||
- | ||
+ | ||
if (oldViewProps.blurAmount != newViewProps.blurAmount) { | ||
NSNumber *blurAmount = [NSNumber numberWithInt:newViewProps.blurAmount]; | ||
[self setBlurAmount:blurAmount]; | ||
@@ -83,12 +83,12 @@ | ||
NSString *blurType = [NSString stringWithUTF8String:toString(newViewProps.blurType).c_str()]; | ||
[self setBlurType:blurType]; | ||
} | ||
- | ||
+ | ||
if (oldViewProps.reducedTransparencyFallbackColor != newViewProps.reducedTransparencyFallbackColor) { | ||
UIColor *color = RCTUIColorFromSharedColor(newViewProps.reducedTransparencyFallbackColor); | ||
[self setReducedTransparencyFallbackColor:color]; | ||
} | ||
- | ||
+ | ||
[super updateProps:props oldProps:oldProps]; | ||
} | ||
#endif // RCT_NEW_ARCH_ENABLED | ||
@@ -131,6 +131,7 @@ | ||
|
||
- (UIBlurEffectStyle)blurEffectStyle | ||
{ | ||
+ if ([self.blurType isEqual: @"transparent"]) return UIBlurEffectStyleDark; | ||
if ([self.blurType isEqual: @"xlight"]) return UIBlurEffectStyleExtraLight; | ||
if ([self.blurType isEqual: @"light"]) return UIBlurEffectStyleLight; | ||
if ([self.blurType isEqual: @"dark"]) return UIBlurEffectStyleDark; | ||
@@ -139,7 +140,7 @@ | ||
if ([self.blurType isEqual: @"regular"]) return UIBlurEffectStyleRegular; | ||
if ([self.blurType isEqual: @"prominent"]) return UIBlurEffectStyleProminent; | ||
#endif | ||
- | ||
+ | ||
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 /* __IPHONE_13_0 */ | ||
// Adaptable blur styles | ||
if ([self.blurType isEqual: @"chromeMaterial"]) return UIBlurEffectStyleSystemChromeMaterial; | ||
@@ -160,7 +161,7 @@ | ||
if ([self.blurType isEqual: @"thinMaterialLight"]) return UIBlurEffectStyleSystemThinMaterialLight; | ||
if ([self.blurType isEqual: @"ultraThinMaterialLight"]) return UIBlurEffectStyleSystemUltraThinMaterialLight; | ||
#endif | ||
- | ||
+ | ||
#if TARGET_OS_TV | ||
if ([self.blurType isEqual: @"regular"]) return UIBlurEffectStyleRegular; | ||
if ([self.blurType isEqual: @"prominent"]) return UIBlurEffectStyleProminent; | ||
@@ -183,6 +184,13 @@ | ||
UIBlurEffectStyle style = [self blurEffectStyle]; | ||
self.blurEffect = [BlurEffectWithAmount effectWithStyle:style andBlurAmount:self.blurAmount]; | ||
self.blurEffectView.effect = self.blurEffect; | ||
+ | ||
+ if ([self.blurType isEqual: @"transparent"]) { | ||
+ for (UIView *subview in self.blurEffectView.subviews) { | ||
+ subview.backgroundColor = [UIColor clearColor]; | ||
+ } | ||
+ } | ||
+ | ||
} | ||
|
||
- (void)updateFallbackView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- /tmp/tmp-status-mobile-61974dae4/tmp.mlMQWwuuYK/BlurViewManagerImpl.java 2024-04-16 17:04:08.840327000 +0200 | ||
+++ ./node_modules/@react-native-community/blur/android/src/main/java/com/reactnativecommunity/blurview/BlurViewManagerImpl.java 2024-04-16 17:04:31.902236892 +0200 | ||
@@ -29,7 +29,7 @@ | ||
.getDecorView(); | ||
ViewGroup rootView = decorView.findViewById(android.R.id.content); | ||
Drawable windowBackground = decorView.getBackground(); | ||
- if (Build.VERSION.SDK_INT >= 31) { | ||
+ if (Build.VERSION.SDK_INT >= 31 && blurView.isHardwareAccelerated()) { | ||
blurView | ||
.setupWith(rootView, new RenderEffectBlur()) | ||
.setFrameClearDrawable(windowBackground) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- /tmp/tmp-status-mobile-61974dae4/tmp.NHLSFZG6LG/BlurViewNativeComponent.ts 2024-04-16 17:08:42.755929000 +0200 | ||
+++ ./node_modules/@react-native-community/blur/src/fabric/BlurViewNativeComponent.ts 2024-04-16 17:08:57.634037113 +0200 | ||
@@ -10,6 +10,7 @@ | ||
| 'dark' | ||
| 'light' | ||
| 'xlight' | ||
+ | 'transparent' | ||
| 'prominent' | ||
| 'regular' | ||
| 'extraDark' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- /tmp/tmp-status-mobile-61974dae4/tmp.zy6uXqO4gW/VibrancyViewNativeComponent.ts 2024-04-16 17:09:23.772623000 +0200 | ||
+++ ./node_modules/@react-native-community/blur/src/fabric/VibrancyViewNativeComponent.ts 2024-04-16 17:09:39.033737349 +0200 | ||
@@ -10,6 +10,7 @@ | ||
| 'dark' | ||
| 'light' | ||
| 'xlight' | ||
+ | 'transparent' | ||
| 'prominent' | ||
| 'regular' | ||
| 'extraDark' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- /tmp/tmp-status-mobile-61974dae4/tmp.J4PMGrqP44/build.gradle 2024-04-16 17:03:10.810339000 +0200 | ||
+++ ./node_modules/@react-native-community/blur/android/build.gradle 2024-04-16 17:03:33.299457138 +0200 | ||
@@ -5,7 +5,7 @@ | ||
} | ||
|
||
dependencies { | ||
- classpath 'com.android.tools.build:gradle:3.5.3' | ||
+ classpath 'com.android.tools.build:gradle:3.5.4' | ||
} | ||
} | ||
|
||
@@ -138,5 +138,5 @@ | ||
implementation "com.facebook.react:react-native:+" | ||
// From node_modules | ||
|
||
- implementation 'com.github.Dimezis:BlurView:version-2.0.2' | ||
+ implementation 'com.github.Dimezis:BlurView:version-2.0.3' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2593,9 +2593,10 @@ | |
eventemitter3 "^1.2.0" | ||
lodash "^4.17.15" | ||
|
||
"@react-native-community/blur@git+https://github.com/status-im/react-native-blur.git#refs/tags/v4.3.3-status": | ||
version "4.3.3" | ||
resolved "git+https://github.com/status-im/react-native-blur.git#c140cc8e7d54e3318af0a7c149b5d64b54de3419" | ||
"@react-native-community/[email protected]": | ||
version "4.3.0" | ||
resolved "https://registry.yarnpkg.com/@react-native-community/blur/-/blur-4.3.0.tgz#e5018b3b0bd6de9632ac6cf34e9f8e0f1a9a28ec" | ||
integrity sha512-d6phh39kKcbZ4IluDftiVWqfeFOgjl1AbQWzN47x+hLKQ5GvQJ6QhRvgAuDZ+xbJksrbXgNpMjVYkjsbcVehxg== | ||
|
||
"@react-native-community/[email protected]": | ||
version "12.3.6" | ||
|