mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Quick fixes
This commit is contained in:
parent
3d388560c4
commit
86f2fd2701
@ -204,7 +204,7 @@ func chatListFilterItems(postbox: Postbox) -> Signal<(Int, [(ChatListFilter, Int
|
||||
}
|
||||
}
|
||||
}
|
||||
result.append((filter, count, hasUnmutedUnread))
|
||||
result.append((filter, max(0, count), hasUnmutedUnread))
|
||||
}
|
||||
|
||||
return (totalBadge, result)
|
||||
|
@ -322,7 +322,7 @@ open class ASButtonNode: ASControlNode {
|
||||
imageOrigin = CGPoint(x: titleOrigin.x - self.contentSpacing - imageSize.width, y: contentRect.minY + floor((contentRect.height - imageSize.height) / 2.0))
|
||||
default:
|
||||
titleOrigin = CGPoint(x: contentRect.minX + floor((contentRect.width - self.calculatedTitleSize.width) / 2.0), y: contentRect.minY + floor((contentRect.height - self.calculatedTitleSize.height) / 2.0))
|
||||
highlightedTitleOrigin = CGPoint(x: floor((contentRect.width - self.calculatedHighlightedTitleSize.width) / 2.0), y: contentRect.minY + floor((contentRect.height - self.calculatedHighlightedTitleSize.height) / 2.0))
|
||||
highlightedTitleOrigin = CGPoint(x: contentRect.minX + floor((contentRect.width - self.calculatedHighlightedTitleSize.width) / 2.0), y: contentRect.minY + floor((contentRect.height - self.calculatedHighlightedTitleSize.height) / 2.0))
|
||||
disabledTitleOrigin = CGPoint(x: floor((contentRect.width - self.calculatedDisabledTitleSize.width) / 2.0), y: contentRect.minY + floor((contentRect.height - self.calculatedDisabledTitleSize.height) / 2.0))
|
||||
imageOrigin = CGPoint(x: floor((contentRect.width - imageSize.width) / 2.0), y: contentRect.minY + floor((contentRect.height - imageSize.height) / 2.0))
|
||||
}
|
||||
|
@ -129,8 +129,8 @@ private final class TooltipScreenNode: ViewControllerTracingNode {
|
||||
openActiveTextItem(.textMention(mention), .tap)
|
||||
} else if let command = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.BotCommand)] as? String {
|
||||
openActiveTextItem(.botCommand(command), .tap)
|
||||
} else if let hashtag = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.Hashtag)] as? String {
|
||||
openActiveTextItem(.hashtag(hashtag), .tap)
|
||||
} else if let hashtag = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.Hashtag)] as? TelegramHashtag {
|
||||
openActiveTextItem(.hashtag(hashtag.hashtag), .tap)
|
||||
}
|
||||
}
|
||||
|
||||
@ -146,8 +146,8 @@ private final class TooltipScreenNode: ViewControllerTracingNode {
|
||||
openActiveTextItem(.textMention(mention), .longTap)
|
||||
} else if let command = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.BotCommand)] as? String {
|
||||
openActiveTextItem(.botCommand(command), .longTap)
|
||||
} else if let hashtag = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.Hashtag)] as? String {
|
||||
openActiveTextItem(.hashtag(hashtag), .longTap)
|
||||
} else if let hashtag = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.Hashtag)] as? TelegramHashtag {
|
||||
openActiveTextItem(.hashtag(hashtag.hashtag), .longTap)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user