From 4317ba43e4e417ab136da72dad41a0287882efb1 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Thu, 10 Aug 2023 22:01:12 +0400 Subject: [PATCH] Fix editing panel --- .../Sources/PeerListItemComponent.swift | 2 ++ .../Sources/StoryItemSetContainerComponent.swift | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/submodules/TelegramUI/Components/Stories/PeerListItemComponent/Sources/PeerListItemComponent.swift b/submodules/TelegramUI/Components/Stories/PeerListItemComponent/Sources/PeerListItemComponent.swift index 4ef92c455c..d8d8cdab6d 100644 --- a/submodules/TelegramUI/Components/Stories/PeerListItemComponent/Sources/PeerListItemComponent.swift +++ b/submodules/TelegramUI/Components/Stories/PeerListItemComponent/Sources/PeerListItemComponent.swift @@ -499,6 +499,8 @@ public final class PeerListItemComponent: Component { } else { clipStyle = .round } + let _ = clipStyle + let _ = synchronousLoad self.avatarNode.setPeer(context: component.context, theme: component.theme, peer: peer, clipStyle: clipStyle, synchronousLoad: synchronousLoad, displayDimensions: CGSize(width: avatarSize, height: avatarSize)) self.avatarNode.setStoryStats(storyStats: component.storyStats.flatMap { storyStats -> AvatarNode.StoryStats in return AvatarNode.StoryStats( diff --git a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift index 34704727eb..48cffd2a36 100644 --- a/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift +++ b/submodules/TelegramUI/Components/Stories/StoryContainerScreen/Sources/StoryItemSetContainerComponent.swift @@ -1163,7 +1163,7 @@ public final class StoryItemSetContainerComponent: Component { if let currentIndex = component.slice.allItems.firstIndex(where: { $0.storyItem.id == component.slice.item.storyItem.id }) { if index != currentIndex { let nextId = component.slice.allItems[index].storyItem.id - self.awaitingSwitchToId = (component.slice.allItems[currentIndex].storyItem.id, nextId) + //self.awaitingSwitchToId = (component.slice.allItems[currentIndex].storyItem.id, nextId) component.navigate(.id(nextId)) } } @@ -1603,7 +1603,13 @@ public final class StoryItemSetContainerComponent: Component { let footerPanelFrame = CGRect(origin: CGPoint(x: itemPositionX - footerSize.width * 0.5, y: footerPanelY), size: footerSize) itemTransition.setFrame(view: footerPanelView, frame: footerPanelFrame) - itemTransition.setAlpha(view: footerPanelView, alpha: 1.0 - itemLayout.contentOverflowFraction) + + var footerAlpha: CGFloat = 1.0 - itemLayout.contentOverflowFraction + if component.hideUI || self.isEditingStory { + footerAlpha = 0.0 + } + + itemTransition.setAlpha(view: footerPanelView, alpha: footerAlpha) } } else if let footerPanel = visibleItem.footerPanel { visibleItem.footerPanel = nil