Various Improvements

This commit is contained in:
Ilya Laktyushin
2022-04-23 05:28:29 +04:00
parent e3dc5cbe8a
commit 71bde57b6a
90 changed files with 1757 additions and 297 deletions

View File

@@ -1067,8 +1067,12 @@ public final class ListMessageFileItemNode: ListMessageNode {
let descriptionFrame = strongSelf.descriptionNode.frame
shapes.append(.roundedRectLine(startPoint: CGPoint(x: descriptionFrame.minX, y: descriptionFrame.minY + floor((descriptionFrame.height - lineDiameter) / 2.0)), width: descriptionLineWidth, diameter: lineDiameter))
shapes.append(.roundedRect(rect: iconFrame, cornerRadius: 6.0))
if let media = selectedMedia as? TelegramMediaFile, media.isInstantVideo {
shapes.append(.circle(iconFrame))
} else {
shapes.append(.roundedRect(rect: iconFrame, cornerRadius: 6.0))
}
shimmerNode.update(backgroundColor: item.presentationData.theme.theme.list.itemBlocksBackgroundColor, foregroundColor: item.presentationData.theme.theme.list.mediaPlaceholderColor, shimmeringColor: item.presentationData.theme.theme.list.itemBlocksBackgroundColor.withAlphaComponent(0.4), shapes: shapes, size: nodeLayout.contentSize)
} else if let shimmerNode = strongSelf.placeholderNode {
strongSelf.placeholderNode = nil