diff --git a/submodules/QrCodeUI/Sources/QrCodeScanScreen.swift b/submodules/QrCodeUI/Sources/QrCodeScanScreen.swift index 0ab14cb9a5..d38c8efc06 100644 --- a/submodules/QrCodeUI/Sources/QrCodeScanScreen.swift +++ b/submodules/QrCodeUI/Sources/QrCodeScanScreen.swift @@ -307,6 +307,7 @@ private final class FrameNode: ASDisplayNode { for line in self.lines { line.strokeColor = UIColor.white.cgColor + line.fillColor = UIColor.clear.cgColor line.lineWidth = 4.0 line.lineCap = .round self.layer.addSublayer(line) diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 334b8b739f..9b460cf5ef 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -9668,7 +9668,11 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G let peerId = self.chatLocation.peerId if let subject = self.subject, case .scheduledMessages = subject { } else { - self.buttonUnreadCountDisposable = (self.context.chatLocationUnreadCount(for: self.chatLocation, contextHolder: self.chatLocationContextHolder) + let throttledUnreadCountSignal = self.context.chatLocationUnreadCount(for: self.chatLocation, contextHolder: self.chatLocationContextHolder) + |> mapToThrottled { value -> Signal in + return .single(value) |> then(.complete() |> delay(0.2, queue: Queue.mainQueue())) + } + self.buttonUnreadCountDisposable = (throttledUnreadCountSignal |> deliverOnMainQueue).start(next: { [weak self] count in guard let strongSelf = self else { return diff --git a/submodules/TelegramUI/Sources/ChatHistoryNavigationButtonNode.swift b/submodules/TelegramUI/Sources/ChatHistoryNavigationButtonNode.swift index fd6d9a92da..98ab11bdc2 100644 --- a/submodules/TelegramUI/Sources/ChatHistoryNavigationButtonNode.swift +++ b/submodules/TelegramUI/Sources/ChatHistoryNavigationButtonNode.swift @@ -6,7 +6,7 @@ import TelegramPresentationData import WallpaperBackgroundNode import AnimatedCountLabelNode -private let badgeFont = Font.regular(13.0) +private let badgeFont = Font.with(size: 13.0, traits: [.monospacedNumbers]) enum ChatHistoryNavigationButtonType { case down @@ -197,7 +197,7 @@ class ChatHistoryNavigationButtonNode: ContextControllerSourceNode { } }) self.badgeBackgroundNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2) - } else if previousValue != self.currentValue { + } else if previousValue < self.currentValue { self.badgeBackgroundNode.layer.animateScale(from: 1.0, to: 1.2, duration: 0.12, removeOnCompletion: false, completion: { [weak self] finished in if let strongSelf = self { strongSelf.badgeBackgroundNode.layer.animateScale(from: 1.2, to: 1.0, duration: 0.12, removeOnCompletion: false, completion: { _ in