mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 11:23:48 +00:00
Fix animations
This commit is contained in:
parent
547f844ebc
commit
afe3c2bd6b
@ -307,6 +307,7 @@ private final class FrameNode: ASDisplayNode {
|
|||||||
|
|
||||||
for line in self.lines {
|
for line in self.lines {
|
||||||
line.strokeColor = UIColor.white.cgColor
|
line.strokeColor = UIColor.white.cgColor
|
||||||
|
line.fillColor = UIColor.clear.cgColor
|
||||||
line.lineWidth = 4.0
|
line.lineWidth = 4.0
|
||||||
line.lineCap = .round
|
line.lineCap = .round
|
||||||
self.layer.addSublayer(line)
|
self.layer.addSublayer(line)
|
||||||
|
@ -9668,7 +9668,11 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
let peerId = self.chatLocation.peerId
|
let peerId = self.chatLocation.peerId
|
||||||
if let subject = self.subject, case .scheduledMessages = subject {
|
if let subject = self.subject, case .scheduledMessages = subject {
|
||||||
} else {
|
} 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<Int, NoError> in
|
||||||
|
return .single(value) |> then(.complete() |> delay(0.2, queue: Queue.mainQueue()))
|
||||||
|
}
|
||||||
|
self.buttonUnreadCountDisposable = (throttledUnreadCountSignal
|
||||||
|> deliverOnMainQueue).start(next: { [weak self] count in
|
|> deliverOnMainQueue).start(next: { [weak self] count in
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
|
@ -6,7 +6,7 @@ import TelegramPresentationData
|
|||||||
import WallpaperBackgroundNode
|
import WallpaperBackgroundNode
|
||||||
import AnimatedCountLabelNode
|
import AnimatedCountLabelNode
|
||||||
|
|
||||||
private let badgeFont = Font.regular(13.0)
|
private let badgeFont = Font.with(size: 13.0, traits: [.monospacedNumbers])
|
||||||
|
|
||||||
enum ChatHistoryNavigationButtonType {
|
enum ChatHistoryNavigationButtonType {
|
||||||
case down
|
case down
|
||||||
@ -197,7 +197,7 @@ class ChatHistoryNavigationButtonNode: ContextControllerSourceNode {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
self.badgeBackgroundNode.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2)
|
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
|
self.badgeBackgroundNode.layer.animateScale(from: 1.0, to: 1.2, duration: 0.12, removeOnCompletion: false, completion: { [weak self] finished in
|
||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
strongSelf.badgeBackgroundNode.layer.animateScale(from: 1.2, to: 1.0, duration: 0.12, removeOnCompletion: false, completion: { _ in
|
strongSelf.badgeBackgroundNode.layer.animateScale(from: 1.2, to: 1.0, duration: 0.12, removeOnCompletion: false, completion: { _ in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user