Improve dynamic type

This commit is contained in:
Ali
2019-11-22 19:04:51 +04:00
parent b65d5d2711
commit f7fab3f1af
10 changed files with 110 additions and 51 deletions

View File

@@ -10,8 +10,6 @@ import TelegramPresentationData
import ChatTitleActivityNode
import LocalizedPeerData
private let textFont = Font.regular(15.0)
final class ChatListInputActivitiesNode: ASDisplayNode {
private let activityNode: ChatTitleActivityNode
@@ -23,8 +21,12 @@ final class ChatListInputActivitiesNode: ASDisplayNode {
self.addSubnode(self.activityNode)
}
func asyncLayout() -> (CGSize, PresentationStrings, UIColor, PeerId, [(Peer, PeerInputActivity)]) -> (CGSize, () -> Void) {
return { [weak self] boundingSize, strings, color, peerId, activities in
func asyncLayout() -> (CGSize, ChatListPresentationData, UIColor, PeerId, [(Peer, PeerInputActivity)]) -> (CGSize, () -> Void) {
return { [weak self] boundingSize, presentationData, color, peerId, activities in
let strings = presentationData.strings
let textFont = Font.regular(floor(presentationData.fontSize.itemListBaseFontSize * 15.0 / 17.0))
var state = ChatTitleActivityNodeState.none
if !activities.isEmpty {