mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Use peer name localization
This commit is contained in:
@@ -21,6 +21,7 @@ final class InstantPageControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
private var themeSettings: PresentationThemeSettings?
|
||||
private var presentationTheme: PresentationTheme
|
||||
private var strings: PresentationStrings
|
||||
private var nameDisplayOrder: PresentationPersonNameOrder
|
||||
private var dateTimeFormat: PresentationDateTimeFormat
|
||||
private var theme: InstantPageTheme?
|
||||
private let sourcePeerType: MediaAutoDownloadPeerType
|
||||
@@ -85,10 +86,11 @@ final class InstantPageControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
return InstantPageStoredState(contentOffset: Double(self.scrollNode.view.contentOffset.y), details: details)
|
||||
}
|
||||
|
||||
init(context: AccountContext, settings: InstantPagePresentationSettings?, themeSettings: PresentationThemeSettings?, presentationTheme: PresentationTheme, strings: PresentationStrings, dateTimeFormat: PresentationDateTimeFormat, statusBar: StatusBar, sourcePeerType: MediaAutoDownloadPeerType, getNavigationController: @escaping () -> NavigationController?, present: @escaping (ViewController, Any?) -> Void, pushController: @escaping (ViewController) -> Void, openPeer: @escaping (PeerId) -> Void, navigateBack: @escaping () -> Void) {
|
||||
init(context: AccountContext, settings: InstantPagePresentationSettings?, themeSettings: PresentationThemeSettings?, presentationTheme: PresentationTheme, strings: PresentationStrings, dateTimeFormat: PresentationDateTimeFormat, nameDisplayOrder: PresentationPersonNameOrder, statusBar: StatusBar, sourcePeerType: MediaAutoDownloadPeerType, getNavigationController: @escaping () -> NavigationController?, present: @escaping (ViewController, Any?) -> Void, pushController: @escaping (ViewController) -> Void, openPeer: @escaping (PeerId) -> Void, navigateBack: @escaping () -> Void) {
|
||||
self.context = context
|
||||
self.presentationTheme = presentationTheme
|
||||
self.dateTimeFormat = dateTimeFormat
|
||||
self.nameDisplayOrder = nameDisplayOrder
|
||||
self.strings = strings
|
||||
self.settings = settings
|
||||
let themeReferenceDate = Date()
|
||||
@@ -532,7 +534,7 @@ final class InstantPageControllerNode: ASDisplayNode, UIScrollViewDelegate {
|
||||
let itemIndex = itemIndex
|
||||
let embedIndex = embedIndex
|
||||
let detailsIndex = detailsIndex
|
||||
if let newNode = item.node(context: self.context, strings: self.strings, theme: theme, openMedia: { [weak self] media in
|
||||
if let newNode = item.node(context: self.context, strings: self.strings, nameDisplayOrder: self.nameDisplayOrder, theme: theme, openMedia: { [weak self] media in
|
||||
self?.openMedia(media)
|
||||
}, longPressMedia: { [weak self] media in
|
||||
self?.longPressMedia(media)
|
||||
|
||||
Reference in New Issue
Block a user