diff --git a/submodules/TelegramUI/Components/Stories/AvatarStoryIndicatorComponent/Sources/AvatarStoryIndicatorComponent.swift b/submodules/TelegramUI/Components/Stories/AvatarStoryIndicatorComponent/Sources/AvatarStoryIndicatorComponent.swift index 734d1369f3..08ed7b98ea 100644 --- a/submodules/TelegramUI/Components/Stories/AvatarStoryIndicatorComponent/Sources/AvatarStoryIndicatorComponent.swift +++ b/submodules/TelegramUI/Components/Stories/AvatarStoryIndicatorComponent/Sources/AvatarStoryIndicatorComponent.swift @@ -118,6 +118,8 @@ public final class AvatarStoryIndicatorComponent: Component { inactiveColors = [UIColor(rgb: 0xD8D8E1).cgColor, UIColor(rgb: 0xD8D8E1).cgColor] } + var locations: [CGFloat] = [0.0, 1.0] + context.setLineWidth(lineWidth) if let counters = component.counters, counters.totalCount > 1 { @@ -151,7 +153,6 @@ public final class AvatarStoryIndicatorComponent: Component { context.replacePathWithStrokedPath() context.clip() - var locations: [CGFloat] = [1.0, 0.0] let colors: [CGColor] if pass == 1 { colors = activeColors @@ -171,16 +172,11 @@ public final class AvatarStoryIndicatorComponent: Component { context.replacePathWithStrokedPath() context.clip() - var locations: [CGFloat] = [1.0, 0.0] let colors: [CGColor] if component.hasUnseen { - colors = [UIColor(rgb: 0x34C76F).cgColor, UIColor(rgb: 0x3DA1FD).cgColor] + colors = activeColors } else { - if component.isDarkTheme { - colors = [UIColor(rgb: 0x48484A).cgColor, UIColor(rgb: 0x48484A).cgColor] - } else { - colors = [UIColor(rgb: 0xD8D8E1).cgColor, UIColor(rgb: 0xD8D8E1).cgColor] - } + colors = inactiveColors } let colorSpace = CGColorSpaceCreateDeviceRGB() diff --git a/submodules/TelegramUI/Components/Stories/StorySetIndicatorComponent/Sources/StorySetIndicatorComponent.swift b/submodules/TelegramUI/Components/Stories/StorySetIndicatorComponent/Sources/StorySetIndicatorComponent.swift index df784c454e..f4e01a6351 100644 --- a/submodules/TelegramUI/Components/Stories/StorySetIndicatorComponent/Sources/StorySetIndicatorComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StorySetIndicatorComponent/Sources/StorySetIndicatorComponent.swift @@ -71,13 +71,13 @@ private final class ShapeImageView: UIView { if let image = item.image { context.translateBy(x: imageRect.midX, y: imageRect.midY) - context.scaleBy(x: 1.0, y: -1.0) + context.scaleBy(x: 1.0, y: 1.0) context.translateBy(x: -imageRect.midX, y: -imageRect.midY) image.draw(in: imageRect, blendMode: .normal, alpha: 1.0) context.translateBy(x: imageRect.midX, y: imageRect.midY) - context.scaleBy(x: 1.0, y: -1.0) + context.scaleBy(x: 1.0, y: 1.0) context.translateBy(x: -imageRect.midX, y: -imageRect.midY) } else { context.setFillColor(UIColor.black.cgColor)