mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
77d45e60bc
commit
ba24da0593
@ -1227,15 +1227,18 @@ public final class AvatarNode: ASDisplayNode {
|
|||||||
public var colors: Colors
|
public var colors: Colors
|
||||||
public var lineWidth: CGFloat
|
public var lineWidth: CGFloat
|
||||||
public var inactiveLineWidth: CGFloat
|
public var inactiveLineWidth: CGFloat
|
||||||
|
public var forceRoundedRect: Bool
|
||||||
|
|
||||||
public init(
|
public init(
|
||||||
colors: Colors,
|
colors: Colors,
|
||||||
lineWidth: CGFloat,
|
lineWidth: CGFloat,
|
||||||
inactiveLineWidth: CGFloat
|
inactiveLineWidth: CGFloat,
|
||||||
|
forceRoundedRect: Bool = false
|
||||||
) {
|
) {
|
||||||
self.colors = colors
|
self.colors = colors
|
||||||
self.lineWidth = lineWidth
|
self.lineWidth = lineWidth
|
||||||
self.inactiveLineWidth = inactiveLineWidth
|
self.inactiveLineWidth = inactiveLineWidth
|
||||||
|
self.forceRoundedRect = forceRoundedRect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1290,7 +1293,7 @@ public final class AvatarNode: ASDisplayNode {
|
|||||||
unseenCount: storyStats.unseenCount
|
unseenCount: storyStats.unseenCount
|
||||||
),
|
),
|
||||||
progress: mappedProgress,
|
progress: mappedProgress,
|
||||||
isRoundedRect: self.contentNode.clipStyle == .roundedRect
|
isRoundedRect: self.contentNode.clipStyle == .roundedRect || storyPresentationParams.forceRoundedRect
|
||||||
)),
|
)),
|
||||||
environment: {},
|
environment: {},
|
||||||
containerSize: indicatorSize
|
containerSize: indicatorSize
|
||||||
|
@ -126,10 +126,17 @@ final class PeerInfoAvatarTransformContainerNode: ASDisplayNode {
|
|||||||
progress: storyProgress
|
progress: storyProgress
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var isForum = false
|
||||||
|
if let peer, let channel = peer as? TelegramChannel, channel.isForum {
|
||||||
|
isForum = true
|
||||||
|
}
|
||||||
|
|
||||||
self.avatarNode.setStoryStats(storyStats: storyStats, presentationParams: AvatarNode.StoryPresentationParams(
|
self.avatarNode.setStoryStats(storyStats: storyStats, presentationParams: AvatarNode.StoryPresentationParams(
|
||||||
colors: colors,
|
colors: colors,
|
||||||
lineWidth: 3.0,
|
lineWidth: 3.0,
|
||||||
inactiveLineWidth: 1.5
|
inactiveLineWidth: 1.5,
|
||||||
|
forceRoundedRect: isForum
|
||||||
), transition: Transition(transition))
|
), transition: Transition(transition))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user