diff --git a/submodules/BrowserUI/BUILD b/submodules/BrowserUI/BUILD index d92faaf470..e28f412f44 100644 --- a/submodules/BrowserUI/BUILD +++ b/submodules/BrowserUI/BUILD @@ -38,6 +38,7 @@ swift_library( "//submodules/TelegramUI/Components/ContextReferenceButtonComponent", "//submodules/Svg", "//submodules/PromptUI", + "//submodules/TelegramUI/Components/LottieComponent", ], visibility = [ "//visibility:public", diff --git a/submodules/BrowserUI/Sources/BrowserNavigationBarComponent.swift b/submodules/BrowserUI/Sources/BrowserNavigationBarComponent.swift index 3921ea991a..a20a2db6cd 100644 --- a/submodules/BrowserUI/Sources/BrowserNavigationBarComponent.swift +++ b/submodules/BrowserUI/Sources/BrowserNavigationBarComponent.swift @@ -369,7 +369,7 @@ final class ReferenceButtonComponent: Component { final class View: HighlightTrackingButton, ComponentTaggedView { private let sourceView: ContextControllerSourceView let referenceNode: ContextReferenceContentNode - private let componentView: ComponentView + let componentView: ComponentView private var component: ReferenceButtonComponent? diff --git a/submodules/BrowserUI/Sources/BrowserScreen.swift b/submodules/BrowserUI/Sources/BrowserScreen.swift index fa13fd889f..ee0cea073f 100644 --- a/submodules/BrowserUI/Sources/BrowserScreen.swift +++ b/submodules/BrowserUI/Sources/BrowserScreen.swift @@ -17,6 +17,7 @@ import MultilineTextComponent import MinimizedContainer import InstantPageUI import NavigationStackComponent +import LottieComponent private let settingsTag = GenericComponentViewTag() @@ -125,9 +126,12 @@ private final class BrowserScreenComponent: CombinedComponent { component: AnyComponent( ReferenceButtonComponent( content: AnyComponent( - BundleIconComponent( - name: "Instant View/Settings", - tintColor: environment.theme.rootController.navigationBar.primaryTextColor + LottieComponent( + content: LottieComponent.AppBundleContent( + name: "anim_moredots" + ), + color: environment.theme.rootController.navigationBar.primaryTextColor, + size: CGSize(width: 30.0, height: 30.0) ) ), tag: settingsTag, @@ -150,7 +154,6 @@ private final class BrowserScreenComponent: CombinedComponent { tintColor: environment.theme.rootController.navigationBar.primaryTextColor ) ), - tag: settingsTag, action: { performAction.invoke(isLoading ? .stop : .reload) } @@ -615,6 +618,10 @@ public class BrowserScreen: ViewController, MinimizableController { guard let referenceView = self.componentHost.findTaggedView(tag: settingsTag) as? ReferenceButtonComponent.View else { return } + + if let animationComponentView = referenceView.componentView.view as? LottieComponent.View { + animationComponentView.playOnce() + } self.view.endEditing(true) diff --git a/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift b/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift index bdbdf00eb5..e00e0c4e18 100644 --- a/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift +++ b/submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsListPanelComponent.swift @@ -389,7 +389,17 @@ final class StarsTransactionsListPanelComponent: Component { let wasEmpty = self.items.isEmpty let hadLocalTransactions = self.items.contains(where: { $0.flags.contains(.isLocal) }) - self.items = status.transactions + var existingIds = Set() + var filteredItems: [StarsContext.State.Transaction] = [] + for transaction in status.transactions { + let id = transaction.extendedId + if !existingIds.contains(id) { + existingIds.insert(id) + filteredItems.append(transaction) + } + } + + self.items = filteredItems if !status.isLoading { self.currentLoadMoreId = nil } diff --git a/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift b/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift index c06a8e383f..3dce7ce4b4 100644 --- a/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift +++ b/submodules/TelegramUI/Sources/ChatInterfaceStateContextMenus.swift @@ -3121,11 +3121,11 @@ private final class ChatReadReportContextItemNode: ASDisplayNode, ContextMenuCus } let avatarsSize = self.avatarsNode.update(context: self.item.context, content: avatarsContent, itemSize: CGSize(width: 24.0, height: 24.0), customSpacing: 10.0, animated: false, synchronousLoad: true) - self.avatarsNode.frame = CGRect(origin: CGPoint(x: floorToScreenPixels(size.width - 28.0 - avatarsSize.width / 2.0), y: floor((size.height - avatarsSize.height) / 2.0)), size: avatarsSize) + self.avatarsNode.frame = CGRect(origin: CGPoint(x: floorToScreenPixels(size.width - sideInset - 2.0 - avatarsSize.width), y: floor((size.height - avatarsSize.height) / 2.0)), size: avatarsSize) transition.updateAlpha(node: self.avatarsNode, alpha: self.currentStats == nil ? 0.0 : 1.0) let placeholderAvatarsSize = self.placeholderAvatarsNode.update(context: self.item.context, content: placeholderAvatarsContent, itemSize: CGSize(width: 24.0, height: 24.0), customSpacing: 10.0, animated: false, synchronousLoad: true) - self.placeholderAvatarsNode.frame = CGRect(origin: CGPoint(x: size.width - sideInset - 8.0 - placeholderAvatarsSize.width, y: floor((size.height - placeholderAvatarsSize.height) / 2.0)), size: placeholderAvatarsSize) + self.placeholderAvatarsNode.frame = CGRect(origin: CGPoint(x: size.width - sideInset - 2.0 - placeholderAvatarsSize.width, y: floor((size.height - placeholderAvatarsSize.height) / 2.0)), size: placeholderAvatarsSize) transition.updateAlpha(node: self.placeholderAvatarsNode, alpha: self.currentStats == nil ? 1.0 : 0.0) transition.updateFrame(node: self.backgroundNode, frame: CGRect(origin: CGPoint(x: 0.0, y: 0.0), size: CGSize(width: size.width, height: size.height)))