Web app improvements

This commit is contained in:
Ilya Laktyushin
2023-09-10 15:38:18 +04:00
parent edbdcc2f0d
commit a70c839fb4
3 changed files with 9 additions and 1 deletions

View File

@@ -9967,3 +9967,5 @@ Sorry for the inconvenience.";
"SessionReview.Title" = "New Login Prevented";
"SessionReview.Text" = "We have terminated the login attempt from **%1$@**, **%2$@**";
"SessionReview.OkAction" = "Got it";
"WebApp.RemoveAllConfirmationText" = "This will remove **%@** shortcuts from all menus.";

View File

@@ -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)
}
})
}
}
}

View File

@@ -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()