Setup NSTextAttachmentViewProvider

This commit is contained in:
aringenbach
2022-04-27 11:55:23 +02:00
parent 7c3eb8d5a0
commit 2a5c2b6938
12 changed files with 235 additions and 98 deletions
@@ -433,6 +433,12 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
{
// Apply alpha to blur this component
componentString = [Tools setTextColorAlpha:.2 inAttributedString:componentString];
[Tools setPillAlpha:.2 inAttributedString:componentString];
}
else
{
// PillTextAttachment are not created again every time, we have to set alpha back to standard if needed.
[Tools setPillAlpha:1.f inAttributedString:componentString];
}
// Check whether the timestamp is displayed for this component, and check whether a vertical whitespace is required
@@ -472,6 +478,12 @@ NSString *const URLPreviewDidUpdateNotification = @"URLPreviewDidUpdateNotificat
{
// Apply alpha to blur this component
componentString = [Tools setTextColorAlpha:.2 inAttributedString:componentString];
[Tools setPillAlpha:.2 inAttributedString:componentString];
}
else
{
// PillTextAttachment are not created again every time, we have to set alpha back to standard if needed.
[Tools setPillAlpha:1.f inAttributedString:componentString];
}
// Check whether the timestamp is displayed