Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
laktyushin committed Feb 16, 2024
1 parent cc4089a commit 6fc1939
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 5 additions & 2 deletions submodules/AvatarNode/Sources/AvatarNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1227,15 +1227,18 @@ public final class AvatarNode: ASDisplayNode {
public var colors: Colors
public var lineWidth: CGFloat
public var inactiveLineWidth: CGFloat
public var forceRoundedRect: Bool

public init(
colors: Colors,
lineWidth: CGFloat,
inactiveLineWidth: CGFloat
inactiveLineWidth: CGFloat,
forceRoundedRect: Bool = false
) {
self.colors = colors
self.lineWidth = lineWidth
self.inactiveLineWidth = inactiveLineWidth
self.forceRoundedRect = forceRoundedRect
}
}

Expand Down Expand Up @@ -1290,7 +1293,7 @@ public final class AvatarNode: ASDisplayNode {
unseenCount: storyStats.unseenCount
),
progress: mappedProgress,
isRoundedRect: self.contentNode.clipStyle == .roundedRect
isRoundedRect: self.contentNode.clipStyle == .roundedRect || storyPresentationParams.forceRoundedRect
)),
environment: {},
containerSize: indicatorSize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,17 @@ final class PeerInfoAvatarTransformContainerNode: ASDisplayNode {
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(
colors: colors,
lineWidth: 3.0,
inactiveLineWidth: 1.5
inactiveLineWidth: 1.5,
forceRoundedRect: isForum
), transition: Transition(transition))
}

Expand Down

0 comments on commit 6fc1939

Please sign in to comment.