Various Fixes

This commit is contained in:
Ilya Laktyushin 2021-02-26 18:37:48 +04:00
parent 8e7bd8f23c
commit 68e8c3a4f9
2 changed files with 4 additions and 4 deletions

View File

@ -246,7 +246,7 @@ final class ChatChannelSubscriberInputPanelNode: ChatInputPanelNode {
if self.discussButton.isHidden {
if let action = self.action, action == .muteNotifications || action == .unmuteNotifications {
let buttonWidth = self.button.titleNode.calculateSizeThatFits(CGSize(width: width, height: panelHeight)).width + 24.0
let buttonWidth = self.button.calculateSizeThatFits(CGSize(width: width, height: panelHeight)).width + 24.0
self.button.frame = CGRect(origin: CGPoint(x: floor((width - buttonWidth) / 2.0), y: 0.0), size: CGSize(width: buttonWidth, height: panelHeight))
if let peer = interfaceState.renderedPeer?.peer as? TelegramChannel, peer.flags.contains(.isGigagroup) {

View File

@ -11,7 +11,7 @@ import ItemListPeerItem
import ItemListPeerActionItem
private let collapsedResultCount: Int = 10
private let collapsedInitialLimit: Int = 14
private let collapsedInitialLimit: Int = 10
private final class PollResultsControllerArguments {
let context: AccountContext
@ -269,7 +269,7 @@ private func pollResultsControllerEntries(presentationData: PresentationData, po
let count = optionState.count
let displayCount: Int
if peers.count > collapsedInitialLimit + 1 {
if peers.count > collapsedInitialLimit {
if optionExpandedAtCount != nil {
displayCount = peers.count
} else {
@ -277,7 +277,7 @@ private func pollResultsControllerEntries(presentationData: PresentationData, po
}
} else {
if let optionExpandedAtCount = optionExpandedAtCount {
if optionExpandedAtCount == collapsedInitialLimit + 1 && optionState.canLoadMore {
if optionExpandedAtCount == collapsedInitialLimit && optionState.canLoadMore {
displayCount = collapsedResultCount
} else {
displayCount = peers.count