diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index e536fafcf2..596b383966 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -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."; diff --git a/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift b/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift index a58340a620..71599a277e 100644 --- a/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift +++ b/submodules/GalleryUI/Sources/Items/UniversalVideoGalleryItem.swift @@ -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) + } + }) } } } diff --git a/submodules/TelegramUI/Components/TextFieldComponent/Sources/TextFieldComponent.swift b/submodules/TelegramUI/Components/TextFieldComponent/Sources/TextFieldComponent.swift index ad7753684b..24f6b9349c 100644 --- a/submodules/TelegramUI/Components/TextFieldComponent/Sources/TextFieldComponent.swift +++ b/submodules/TelegramUI/Components/TextFieldComponent/Sources/TextFieldComponent.swift @@ -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) diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index 5acdcf0eaf..78394b8063 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -19246,6 +19246,8 @@ func canAddMessageReactions(message: Message) -> Bool { if story.isMention { return false } + } else if let _ = media as? TelegramMediaExpiredContent { + return false } } return true diff --git a/submodules/WebUI/Sources/WebAppController.swift b/submodules/WebUI/Sources/WebAppController.swift index 11a57d9686..c2bb514522 100644 --- a/submodules/WebUI/Sources/WebAppController.swift +++ b/submodules/WebUI/Sources/WebAppController.swift @@ -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()