mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Pre-release
This commit is contained in:
parent
1025579317
commit
8527ac0928
@ -13770,3 +13770,9 @@ Sorry for the inconvenience.";
|
|||||||
"Gift.Hidden.ChannelText" = "The gift is removed from channel's Page.";
|
"Gift.Hidden.ChannelText" = "The gift is removed from channel's Page.";
|
||||||
|
|
||||||
"Gift.Upgrade.AddChannelName" = "Add channel name to the gift";
|
"Gift.Upgrade.AddChannelName" = "Add channel name to the gift";
|
||||||
|
|
||||||
|
"AffiliateProgram.OpenBot" = "View %@";
|
||||||
|
|
||||||
|
"AvatarUpload.StatusUploading" = "Your photo is uploading.";
|
||||||
|
"AvatarUpload.StatusDone" = "Your photo is now set.";
|
||||||
|
"AvatarUpload.ViewAction" = "View";
|
||||||
|
@ -674,7 +674,6 @@ private func chatListFilterPresetControllerEntries(context: AccountContext, pres
|
|||||||
resolvedColor = context.peerNameColors.getChatFolderTag(tagColor, dark: presentationData.theme.overallDarkAppearance)
|
resolvedColor = context.peerNameColors.getChatFolderTag(tagColor, dark: presentationData.theme.overallDarkAppearance)
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
entries.append(.tagColorHeader(name: state.name, color: resolvedColor, isPremium: isPremium))
|
entries.append(.tagColorHeader(name: state.name, color: resolvedColor, isPremium: isPremium))
|
||||||
entries.append(.tagColor(colors: context.peerNameColors, currentColor: tagColor, isPremium: isPremium))
|
entries.append(.tagColor(colors: context.peerNameColors, currentColor: tagColor, isPremium: isPremium))
|
||||||
entries.append(.tagColorFooter)
|
entries.append(.tagColorFooter)
|
||||||
|
@ -27,4 +27,6 @@ public protocol TabBarController: ViewController {
|
|||||||
func updateIsTabBarEnabled(_ value: Bool, transition: ContainedViewLayoutTransition)
|
func updateIsTabBarEnabled(_ value: Bool, transition: ContainedViewLayoutTransition)
|
||||||
func updateIsTabBarHidden(_ value: Bool, transition: ContainedViewLayoutTransition)
|
func updateIsTabBarHidden(_ value: Bool, transition: ContainedViewLayoutTransition)
|
||||||
func updateLayout(transition: ContainedViewLayoutTransition)
|
func updateLayout(transition: ContainedViewLayoutTransition)
|
||||||
|
|
||||||
|
func updateControllerLayout(controller: ViewController)
|
||||||
}
|
}
|
||||||
|
@ -1404,7 +1404,8 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
|||||||
|
|
||||||
self.clipsToBounds = true
|
self.clipsToBounds = true
|
||||||
|
|
||||||
self.footerContentNode.shareMediaParameters = { [weak self] in
|
//TODO:wip-release
|
||||||
|
/*self.footerContentNode.shareMediaParameters = { [weak self] in
|
||||||
guard let self, let playerStatusValue = self.playerStatusValue else {
|
guard let self, let playerStatusValue = self.playerStatusValue else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -1413,7 +1414,7 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
|||||||
} else {
|
} else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
self.moreBarButton.addTarget(self, action: #selector(self.moreButtonPressed), forControlEvents: .touchUpInside)
|
self.moreBarButton.addTarget(self, action: #selector(self.moreButtonPressed), forControlEvents: .touchUpInside)
|
||||||
self.settingsBarButton.addTarget(self, action: #selector(self.settingsButtonPressed), forControlEvents: .touchUpInside)
|
self.settingsBarButton.addTarget(self, action: #selector(self.settingsButtonPressed), forControlEvents: .touchUpInside)
|
||||||
|
@ -454,6 +454,35 @@ open class TabBarControllerImpl: ViewController, TabBarController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func updateControllerLayout(controller: ViewController) {
|
||||||
|
guard let layout = self.validLayout else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if self.controllers.contains(where: { $0 === controller }) {
|
||||||
|
let currentController = controller
|
||||||
|
currentController.view.frame = CGRect(origin: CGPoint(), size: layout.size)
|
||||||
|
|
||||||
|
var updatedLayout = layout
|
||||||
|
|
||||||
|
var tabBarHeight: CGFloat
|
||||||
|
var options: ContainerViewLayoutInsetOptions = []
|
||||||
|
if updatedLayout.metrics.widthClass == .regular {
|
||||||
|
options.insert(.input)
|
||||||
|
}
|
||||||
|
let bottomInset: CGFloat = updatedLayout.insets(options: options).bottom
|
||||||
|
if !updatedLayout.safeInsets.left.isZero {
|
||||||
|
tabBarHeight = 34.0 + bottomInset
|
||||||
|
} else {
|
||||||
|
tabBarHeight = 49.0 + bottomInset
|
||||||
|
}
|
||||||
|
if !self.tabBarControllerNode.tabBarHidden {
|
||||||
|
updatedLayout.intrinsicInsets.bottom = tabBarHeight
|
||||||
|
}
|
||||||
|
|
||||||
|
currentController.containerLayoutUpdated(updatedLayout, transition: .immediate)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override open func navigationStackConfigurationUpdated(next: [ViewController]) {
|
override open func navigationStackConfigurationUpdated(next: [ViewController]) {
|
||||||
super.navigationStackConfigurationUpdated(next: next)
|
super.navigationStackConfigurationUpdated(next: next)
|
||||||
for controller in self.controllers {
|
for controller in self.controllers {
|
||||||
|
@ -218,19 +218,33 @@ private final class AvatarUploadToastScreenComponent: Component {
|
|||||||
let iconSize = CGSize(width: 30.0, height: 30.0)
|
let iconSize = CGSize(width: 30.0, height: 30.0)
|
||||||
let iconProgressInset: CGFloat = 3.0
|
let iconProgressInset: CGFloat = 3.0
|
||||||
|
|
||||||
|
let uploadingString = environment.strings.AvatarUpload_StatusUploading
|
||||||
|
let doneString = environment.strings.AvatarUpload_StatusDone
|
||||||
|
|
||||||
|
var commonPrefixLength = 0
|
||||||
|
for i in 0 ..< min(uploadingString.count, doneString.count) {
|
||||||
|
if uploadingString[uploadingString.index(uploadingString.startIndex, offsetBy: i)] != doneString[doneString.index(doneString.startIndex, offsetBy: i)] {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
commonPrefixLength = i
|
||||||
|
}
|
||||||
|
|
||||||
var textItems: [AnimatedTextComponent.Item] = []
|
var textItems: [AnimatedTextComponent.Item] = []
|
||||||
textItems.append(AnimatedTextComponent.Item(id: AnyHashable(0), isUnbreakable: true, content: .text("Your photo is ")))
|
|
||||||
|
if commonPrefixLength != 0 {
|
||||||
|
textItems.append(AnimatedTextComponent.Item(id: AnyHashable(0), isUnbreakable: true, content: .text(String(uploadingString[uploadingString.startIndex ..< uploadingString.index(uploadingString.startIndex, offsetBy: commonPrefixLength)]))))
|
||||||
|
}
|
||||||
if isDone {
|
if isDone {
|
||||||
textItems.append(AnimatedTextComponent.Item(id: AnyHashable(1), isUnbreakable: true, content: .text("now set.")))
|
textItems.append(AnimatedTextComponent.Item(id: AnyHashable(1), isUnbreakable: true, content: .text(String(doneString[doneString.index(doneString.startIndex, offsetBy: commonPrefixLength)...]))))
|
||||||
} else {
|
} else {
|
||||||
textItems.append(AnimatedTextComponent.Item(id: AnyHashable(1), isUnbreakable: true, content: .text("uploading.")))
|
textItems.append(AnimatedTextComponent.Item(id: AnyHashable(1), isUnbreakable: true, content: .text(String(uploadingString[uploadingString.index(uploadingString.startIndex, offsetBy: commonPrefixLength)...]))))
|
||||||
}
|
}
|
||||||
|
|
||||||
let actionButtonSize = self.actionButton.update(
|
let actionButtonSize = self.actionButton.update(
|
||||||
transition: .immediate,
|
transition: .immediate,
|
||||||
component: AnyComponent(PlainButtonComponent(
|
component: AnyComponent(PlainButtonComponent(
|
||||||
content: AnyComponent(MultilineTextComponent(
|
content: AnyComponent(MultilineTextComponent(
|
||||||
text: .plain(NSAttributedString(string: "View", font: Font.regular(17.0), textColor: environment.theme.list.itemAccentColor.withMultiplied(hue: 0.933, saturation: 0.61, brightness: 1.0)))
|
text: .plain(NSAttributedString(string: environment.strings.AvatarUpload_ViewAction, font: Font.regular(17.0), textColor: environment.theme.list.itemAccentColor.withMultiplied(hue: 0.933, saturation: 0.61, brightness: 1.0)))
|
||||||
)),
|
)),
|
||||||
effectAlignment: .center,
|
effectAlignment: .center,
|
||||||
contentInsets: UIEdgeInsets(top: -8.0, left: -8.0, bottom: -8.0, right: -8.0),
|
contentInsets: UIEdgeInsets(top: -8.0, left: -8.0, bottom: -8.0, right: -8.0),
|
||||||
|
@ -2419,7 +2419,9 @@ public class ChatSendStarsScreen: ViewControllerComponentContainer {
|
|||||||
topPeers = Array(topPeers.prefix(3))
|
topPeers = Array(topPeers.prefix(3))
|
||||||
}
|
}
|
||||||
|
|
||||||
let channelsForPublicReaction = context.engine.peers.channelsForPublicReaction(useLocalCache: true)
|
//TODO:wip-release
|
||||||
|
//let channelsForPublicReaction = context.engine.peers.channelsForPublicReaction(useLocalCache: true)
|
||||||
|
let channelsForPublicReaction: Signal<[EnginePeer], NoError> = .single([])
|
||||||
let sendAsPeer: Signal<EnginePeer?, NoError> = .single(nil)
|
let sendAsPeer: Signal<EnginePeer?, NoError> = .single(nil)
|
||||||
|
|
||||||
return combineLatest(
|
return combineLatest(
|
||||||
|
@ -833,7 +833,6 @@ private final class JoinAffiliateProgramScreenComponent: Component {
|
|||||||
self.navigationBackgroundView.update(size: navigationBackgroundFrame.size, cornerRadius: 10.0, maskedCorners: [.layerMinXMinYCorner, .layerMaxXMinYCorner], transition: transition.containedViewLayoutTransition)
|
self.navigationBackgroundView.update(size: navigationBackgroundFrame.size, cornerRadius: 10.0, maskedCorners: [.layerMinXMinYCorner, .layerMaxXMinYCorner], transition: transition.containedViewLayoutTransition)
|
||||||
transition.setFrame(layer: self.navigationBarSeparator, frame: CGRect(origin: CGPoint(x: 0.0, y: 54.0), size: CGSize(width: availableSize.width, height: UIScreenPixel)))
|
transition.setFrame(layer: self.navigationBarSeparator, frame: CGRect(origin: CGPoint(x: 0.0, y: 54.0), size: CGSize(width: availableSize.width, height: UIScreenPixel)))
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
var openBotComponents: [AnyComponentWithIdentity<Empty>] = []
|
var openBotComponents: [AnyComponentWithIdentity<Empty>] = []
|
||||||
var openBotLeftInset: CGFloat = 12.0
|
var openBotLeftInset: CGFloat = 12.0
|
||||||
if case .active = component.mode {
|
if case .active = component.mode {
|
||||||
@ -847,7 +846,7 @@ private final class JoinAffiliateProgramScreenComponent: Component {
|
|||||||
translation: CGPoint(x: 0.0, y: 1.0)))))
|
translation: CGPoint(x: 0.0, y: 1.0)))))
|
||||||
}
|
}
|
||||||
openBotComponents.append(AnyComponentWithIdentity(id: 1, component: AnyComponent(MultilineTextComponent(
|
openBotComponents.append(AnyComponentWithIdentity(id: 1, component: AnyComponent(MultilineTextComponent(
|
||||||
text: .plain(NSAttributedString(string: "View " + component.sourcePeer.compactDisplayTitle, font: Font.medium(15.0), textColor: environment.theme.list.itemInputField.primaryColor))
|
text: .plain(NSAttributedString(string: environment.strings.AffiliateProgram_OpenBot(component.sourcePeer.compactDisplayTitle).string, font: Font.medium(15.0), textColor: environment.theme.list.itemInputField.primaryColor))
|
||||||
))))
|
))))
|
||||||
openBotComponents.append(AnyComponentWithIdentity(id: 2, component: AnyComponent(TransformContents(
|
openBotComponents.append(AnyComponentWithIdentity(id: 2, component: AnyComponent(TransformContents(
|
||||||
content: AnyComponent(BundleIconComponent(
|
content: AnyComponent(BundleIconComponent(
|
||||||
|
@ -755,7 +755,10 @@ public final class TelegramRootController: NavigationController, TelegramRootCon
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func openAvatars() {
|
public func openAvatars() {
|
||||||
self.accountSettingsController?.openAvatars()
|
if let accountSettingsController = self.accountSettingsController {
|
||||||
|
self.rootTabController?.updateControllerLayout(controller: accountSettingsController)
|
||||||
|
accountSettingsController.openAvatars()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user