mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-28 10:55:40 +00:00
Cherry-pick fixes
This commit is contained in:
parent
f5c4ef594b
commit
e5d2537683
@ -9900,11 +9900,4 @@ Sorry for the inconvenience.";
|
||||
"SessionReview.Text" = "We have terminated the login attempt from **%1$@**, **%2$@**";
|
||||
"SessionReview.OkAction" = "Got it";
|
||||
|
||||
"WebApp.DisclaimerTitle" = "Terms of Use";
|
||||
"WebApp.DisclaimerText" = "You are about to use a mini app operated by an independent party not affiliated with Telegram. You must agree to the Terms of Use of mini apps to continue.";
|
||||
"WebApp.DisclaimerAgree" = "I agree to the [Terms of Use]()";
|
||||
"WebApp.DisclaimerContinue" = "Continue";
|
||||
"WebApp.Disclaimer_URL" = "https://telegram.org/tos/mini-apps";
|
||||
|
||||
"WebApp.ShortcutsAdded" = "**%@** shortcut added in attachment menu.";
|
||||
"WebApp.ShortcutsSettingsAdded" = "**%@** shortcut added in attachment menu and Settings.";
|
||||
"WebApp.RemoveAllConfirmationText" = "This will remove **%@** shortcuts from all menus.";
|
||||
|
||||
@ -1690,6 +1690,12 @@ final class UniversalVideoGalleryItemNode: ZoomableContentGalleryItemNode {
|
||||
self.hideStatusNodeUntilCentrality = false
|
||||
self.statusButtonNode.isHidden = self.hideStatusNodeUntilCentrality || self.statusNodeShouldBeHidden
|
||||
videoNode.playOnceWithSound(playAndRecord: false, seek: seek, actionAtEnd: self.actionAtEnd)
|
||||
|
||||
Queue.mainQueue().after(1.0, {
|
||||
if let item = self.item, item.isSecret, !self.isPlaying {
|
||||
videoNode.playOnceWithSound(playAndRecord: false, seek: .start, actionAtEnd: self.actionAtEnd)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -825,9 +825,13 @@ public final class TextFieldComponent: Component {
|
||||
var rightmostX = lineRect.maxX + padding
|
||||
let rightmostY = lineRect.minY + self.textView.textContainerInset.top
|
||||
|
||||
let stringIndex = self.textView.text.index(self.textView.text.startIndex, offsetBy: lineRange.location + lineRange.length - 1)
|
||||
if self.textView.text[stringIndex] == " " {
|
||||
rightmostX -= 3.0
|
||||
let nsString = (self.textView.text as NSString)
|
||||
let firstLineEndRange = NSMakeRange(lineRange.location + lineRange.length - 1, 1)
|
||||
if nsString.length > firstLineEndRange.location + firstLineEndRange.length {
|
||||
let lastChar = nsString.substring(with: firstLineEndRange)
|
||||
if lastChar == " " {
|
||||
rightmostX -= 2.0
|
||||
}
|
||||
}
|
||||
|
||||
return CGPoint(x: rightmostX, y: rightmostY)
|
||||
|
||||
@ -19246,6 +19246,8 @@ func canAddMessageReactions(message: Message) -> Bool {
|
||||
if story.isMention {
|
||||
return false
|
||||
}
|
||||
} else if let _ = media as? TelegramMediaExpiredContent {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
|
||||
@ -1530,7 +1530,7 @@ public final class WebAppController: ViewController, AttachmentContainable {
|
||||
|
||||
if let strongSelf = self {
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
strongSelf.present(textAlertController(context: context, title: presentationData.strings.WebApp_RemoveConfirmationTitle, text: presentationData.strings.WebApp_RemoveConfirmationText(strongSelf.botName).string, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: { [weak self] in
|
||||
strongSelf.present(textAlertController(context: context, title: presentationData.strings.WebApp_RemoveConfirmationTitle, text: presentationData.strings.WebApp_RemoveAllConfirmationText(strongSelf.botName).string, actions: [TextAlertAction(type: .genericAction, title: presentationData.strings.Common_Cancel, action: {}), TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: { [weak self] in
|
||||
if let strongSelf = self {
|
||||
let _ = context.engine.messages.removeBotFromAttachMenu(botId: strongSelf.botId).start()
|
||||
strongSelf.dismiss()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user