Set property for UTType & add missing iOS 15 availabilities

This commit is contained in:
aringenbach
2022-05-04 15:58:42 +02:00
parent 6d1abc81a4
commit f590c9356a
6 changed files with 21 additions and 8 deletions
@@ -433,9 +433,11 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
{
// Apply alpha to blur this component
componentString = [Tools setTextColorAlpha:.2 inAttributedString:componentString];
[Tools setPillAlpha:.2 inAttributedString:componentString];
if (@available(iOS 15.0, *)) {
[Tools setPillAlpha:.2 inAttributedString:componentString];
}
}
else
else if (@available(iOS 15.0, *))
{
// PillTextAttachment are not created again every time, we have to set alpha back to standard if needed.
[Tools setPillAlpha:1.f inAttributedString:componentString];
@@ -478,9 +480,11 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
{
// Apply alpha to blur this component
componentString = [Tools setTextColorAlpha:.2 inAttributedString:componentString];
[Tools setPillAlpha:.2 inAttributedString:componentString];
if (@available(iOS 15.0, *)) {
[Tools setPillAlpha:.2 inAttributedString:componentString];
}
}
else
else if (@available(iOS 15.0, *))
{
// PillTextAttachment are not created again every time, we have to set alpha back to standard if needed.
[Tools setPillAlpha:1.f inAttributedString:componentString];