mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various improvements
This commit is contained in:
parent
5d9d794f15
commit
4d9b98b448
@ -12804,7 +12804,7 @@ Sorry for the inconvenience.";
|
||||
"SendStarReactions.SectionTop" = "Top Senders";
|
||||
"SendStarReactions.ShowMyselfInTop" = "Show me in Top Senders";
|
||||
"SendStarReactions.SendButtonTitle" = "Send # %@";
|
||||
"SendStarReactions.TermsOfServiceFooter" = "By sending Stars you agree to the [Terms of Service](https://telegram.org/privacy)";
|
||||
"SendStarReactions.TermsOfServiceFooter" = "By sending Stars you agree to the [Terms of Service](https://telegram.org/tos/stars)";
|
||||
|
||||
"PeerInfo.AllowedReactions.StarReactions" = "Enable Paid Reactions";
|
||||
"PeerInfo.AllowedReactions.StarReactionsFooter" = "Switch this on to let your subscribers set paid reactions with Telegram Stars, which you will be able to withdraw later as TON. [Learn More >](https://telegram.org/privacy)";
|
||||
|
@ -131,7 +131,6 @@ final class BrowserPdfContent: UIView, BrowserContent, UIScrollViewDelegate, PDF
|
||||
private var searchResultsCount: Int = 0
|
||||
private var searchResults: [PDFSelection] = []
|
||||
private var searchCompletion: ((Int) -> Void)?
|
||||
private var searchDimmingView: UIView?
|
||||
|
||||
private let matchColor = UIColor(rgb: 0xd4d4d, alpha: 0.2)
|
||||
private let selectedColor = UIColor(rgb: 0xffe438)
|
||||
@ -299,9 +298,6 @@ final class BrowserPdfContent: UIView, BrowserContent, UIScrollViewDelegate, PDF
|
||||
|
||||
let pdfViewFrame = CGRect(origin: CGPoint(x: insets.left, y: insets.top), size: CGSize(width: size.width - insets.left - insets.right, height: size.height - insets.top - insets.bottom))
|
||||
transition.setFrame(view: self.pdfView, frame: pdfViewFrame)
|
||||
if let searchDimmingView = self.searchDimmingView {
|
||||
transition.setFrame(view: searchDimmingView, frame: CGRect(origin: .zero, size: self.pdfView.bounds.size))
|
||||
}
|
||||
|
||||
if isFirstTime {
|
||||
self.pdfView.setNeedsLayout()
|
||||
|
@ -84,10 +84,6 @@ final class SearchBarContentComponent: Component {
|
||||
private var params: Params?
|
||||
private var component: SearchBarContentComponent?
|
||||
|
||||
public var wantsDisplayBelowKeyboard: Bool {
|
||||
return self.textField != nil
|
||||
}
|
||||
|
||||
init() {
|
||||
self.backgroundLayer = SimpleLayer()
|
||||
|
||||
@ -177,9 +173,10 @@ final class SearchBarContentComponent: Component {
|
||||
private func activateTextInput() {
|
||||
if self.textField == nil, let textFrame = self.textFrame {
|
||||
let backgroundFrame = self.backgroundLayer.frame
|
||||
let textFieldFrame = CGRect(origin: CGPoint(x: textFrame.minX, y: backgroundFrame.minY), size: CGSize(width: backgroundFrame.maxX - textFrame.minX, height: backgroundFrame.height))
|
||||
let textFieldFrame = CGRect(origin: CGPoint(x: textFrame.minX, y: backgroundFrame.minY), size: CGSize(width: backgroundFrame.maxX - textFrame.minX - 32.0, height: backgroundFrame.height))
|
||||
|
||||
let textField = SearchTextField(frame: textFieldFrame)
|
||||
textField.clipsToBounds = true
|
||||
textField.autocorrectionType = .no
|
||||
textField.returnKeyType = .search
|
||||
self.textField = textField
|
||||
|
@ -32,6 +32,7 @@ swift_library(
|
||||
"//submodules/AvatarNode",
|
||||
"//submodules/Components/BundleIconComponent",
|
||||
"//submodules/CheckNode",
|
||||
"//submodules/TextFormat",
|
||||
],
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
|
@ -19,6 +19,7 @@ import RoundedRectWithTailPath
|
||||
import AvatarNode
|
||||
import BundleIconComponent
|
||||
import CheckNode
|
||||
import TextFormat
|
||||
|
||||
private final class BalanceComponent: CombinedComponent {
|
||||
let context: AccountContext
|
||||
@ -1808,12 +1809,26 @@ private final class ChatSendStarsScreenComponent: Component {
|
||||
body: MarkdownAttributeSet(font: Font.regular(13.0), textColor: environment.theme.list.itemSecondaryTextColor),
|
||||
bold: MarkdownAttributeSet(font: Font.semibold(13.0), textColor: environment.theme.list.itemSecondaryTextColor),
|
||||
link: MarkdownAttributeSet(font: Font.regular(13.0), textColor: environment.theme.list.itemAccentColor),
|
||||
linkAttribute: { url in
|
||||
return ("URL", url)
|
||||
linkAttribute: { contents in
|
||||
return (TelegramTextAttributes.URL, contents)
|
||||
}
|
||||
)),
|
||||
horizontalAlignment: .center,
|
||||
maximumNumberOfLines: 0
|
||||
maximumNumberOfLines: 0,
|
||||
highlightColor: environment.theme.list.itemAccentColor.withAlphaComponent(0.2),
|
||||
highlightAction: { attributes in
|
||||
if let _ = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.URL)] {
|
||||
return NSAttributedString.Key(rawValue: TelegramTextAttributes.URL)
|
||||
} else {
|
||||
return nil
|
||||
}
|
||||
},
|
||||
tapAction: { [weak self] attributes, _ in
|
||||
if let controller = self?.environment?.controller(), let navigationController = controller.navigationController as? NavigationController, let url = attributes[NSAttributedString.Key(rawValue: TelegramTextAttributes.URL)] as? String {
|
||||
let presentationData = component.context.sharedContext.currentPresentationData.with { $0 }
|
||||
component.context.sharedContext.openExternalUrl(context: component.context, urlContext: .generic, url: url, forceExternal: false, presentationData: presentationData, navigationController: navigationController, dismissInput: {})
|
||||
}
|
||||
}
|
||||
)),
|
||||
environment: {},
|
||||
containerSize: CGSize(width: availableSize.width - sideInset, height: 1000.0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user